This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias: Speakers - Set Sleep Volume | |
description: Set the volume of speakers lower overnight. | |
triggers: | |
- trigger: time | |
at: "23:00:00" | |
conditions: [] | |
actions: | |
- action: media_player.volume_set | |
metadata: {} | |
data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias: Alert on Pool Gate Opened | |
description: "" | |
mode: single | |
triggers: | |
- type: opened | |
device_id: 896de4d80d8fa631e58804be71b50b51 | |
entity_id: f40b16da6652e7402e9b819f707cedf3 | |
domain: binary_sensor | |
for: | |
hours: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias: Office Lights - Follow Moulding Lights | |
triggers: | |
- entity_id: | |
- switch.ofc_moulding_lights | |
from: "on" | |
to: "off" | |
trigger: state | |
- entity_id: | |
- switch.ofc_moulding_lights | |
from: "off" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import board | |
import time | |
import terminalio | |
import displayio | |
import digitalio | |
from adafruit_display_text import label | |
import adafruit_ili9341 | |
# Release any resources currently in use for the displays | |
displayio.release_displays() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var CosmosClient = require('@azure/cosmos').CosmosClient; | |
var config = require('./config.js'); | |
var client = new CosmosClient({ | |
endpoint: config.connection.endpoint, | |
auth: { masterKey: config.connection.authKey } | |
}); | |
async function upsertProcedureAndExecute(sprocDef, docToInsert) { | |
const { database } = await client.databases | |
.createIfNotExists({ id: config.names.database }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let documentClient = require('documentdb').DocumentClient; | |
let jmespath = require('jmespath'); | |
let cosmos_uri = process.env["STATION_COSMOS_URI"]; | |
let cosmos_key = process.env["STATION_COSMOS_READONLY_KEY"]; | |
let databaseId = process.env["STATION_COSMOS_DATABASE_NAME"]; | |
let collectionId = process.env["STATION_COSMOS_COLLECTION_NAME"]; | |
let client = new documentClient(cosmos_uri, { 'masterKey': cosmos_key }); | |
let collectionLink = "/dbs/" + databaseId + "/colls/" + collectionId + "/"; | |
module.exports = function (context, req) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let documentClient = require('documentdb').DocumentClient; | |
let cosmos_uri = process.env["STATION_COSMOS_URI"]; | |
let cosmos_key = process.env["STATION_COSMOS_READONLY_KEY"]; | |
let databaseId = process.env["STATION_COSMOS_DATABASE_NAME"]; | |
let collectionId = process.env["STATION_COSMOS_COLLECTION_NAME"]; | |
let client = new documentClient(cosmos_uri, { 'masterKey': cosmos_key }); | |
let collectionLink = "/dbs/" + databaseId + "/colls/" + collectionId + "/"; | |
module.exports = function (context, req) { | |
let filterQuery = `SELECT * FROM c WHERE c.State = "${req.params.state}"`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var now = new Date().toUTCString(); | |
pm.environment.set("utcDate", now); | |
var verb = 'GET'; | |
var resourceType = pm.variables.get("resourceType"); | |
var resourceId = pm.variables.get("resourceId"); | |
var text = (verb || "").toLowerCase() + "\n" + (resourceType || "").toLowerCase() + "\n" + (resourceId || "") + "\n" + now.toLowerCase() + "\n" + "" + "\n"; | |
var key = CryptoJS.enc.Base64.parse(pm.variables.get("masterKey")); | |
var signature = CryptoJS.HmacSHA256(text, key).toString(CryptoJS.enc.Base64); |