definition (name: "Zigbee Scene Keypad", namespace: "smartthings", author: "SmartThings", mcdSync: true) {
....
}
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
# Todas estas automações são genéricas e não precisam entender no detalhe, só se quiser realizar algum ajuste | |
# Executa entre 09h30 e 20h00 caso surja lembretes pendentes | |
- alias: Monitora lembretes recorrentes pendentes | |
description: 'Monitora a situação dos lembretes e executa a fala da Alexa para o 1º lembrete pendente da lista' | |
trigger: | |
- platform: state | |
entity_id: | |
- sensor.lembretes_recorrentes_pendentes | |
not_to: | |
- unavailable |
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
>- | |
{%- set response = states("input_text.alexa_custom_skill_notification_response_rejected") -%} | |
{%- set text = (response if response else [ | |
"Tudo bem", | |
"OK" | |
] | random) if states("input_text.alexa_custom_skill_notification_event_id") else "Negativo" -%} | |
{{- "<speak>%s</speak>" % (("<amazon:effect name=\"whispered\">%s</amazon:effect>" % text) if (as_timestamp(today_at()) <= as_timestamp(now()) <= as_timestamp(today_at("08:30:00"))) else text) }} |
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
/** | |
* Depends on | |
* https://gist.github.com/w35l3y/1d4e5578f7ce9d2a3d434729585defa6/ | |
* https://github.com/w35l3y/userscripts/raw/master-greasemonkey/includes/Includes_HttpRequest/ | |
*/ | |
function Session (errorFn) { | |
logger.info("Sessão iniciada."); | |
var dvs = document.querySelector("input[name = 'javax.faces.ViewState']"); |
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
// depends on https://gist.github.com/w35l3y/07442c6adf297703ac7915526a980134 | |
function Logger (script) { | |
var debug = script.debug; | |
this.debug = function () { | |
if (debug) { | |
console.debug.apply(null, arguments); | |
alert(Array.prototype.slice.apply(arguments).join("\n\n")); | |
} |
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
function Script () { | |
Object.defineProperties(this, { | |
debug: { | |
value: /\s+@debug\s+true$/m.test(GM_info.scriptMetaStr), | |
writable: false | |
} | |
}); | |
} |
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
{"aaa":"bbbb"} |
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
djConfig = { | |
isDebug: false, | |
layout: "", | |
usePlainJson: true, | |
baseUrl: "/ccm/web/dojo/", | |
locale: "en-gb", | |
localizationComplete: true | |
}; |
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
function fetch (url, { method = "GET", headers = {}, body = null } = {}) { | |
return new Promise((resolve, reject) => { | |
if ("GET" === method) { | |
if (body) { | |
url += "?" + body; | |
body = null; | |
} | |
delete headers["Content-Type"]; | |
} | |
console.log(method, url, body, headers); |
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 check = (cb, timeout = 30000, step = 5000) => { | |
if (0 >= timeout) { | |
return Promise.reject("TIMEOUT"); | |
} | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
console.log("Checking...", timeout); | |
cb().then(found => { | |
console.log("Checked!", found); | |
if (found) { |
NewerOlder