doorbell sound
This commit is contained in:
parent
f58db13fe2
commit
2263d6475a
|
@ -59,7 +59,14 @@ async function handleCommand(roomId, event) {
|
||||||
const text = event["content"]["body"];
|
const text = event["content"]["body"];
|
||||||
if (!text) return;
|
if (!text) return;
|
||||||
|
|
||||||
console.log(text);
|
if (["doorbell", "open", "ring", "knock", "ding", "dong", "dingdong"].includes(text)) {
|
||||||
|
fetch('https://homeassistant.pvv.ntnu.no:8123/api/webhook/doorbell-oRkXU_ZUFzkc4wTtc6_m9PFR', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type' : 'application/json'
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
var tags = [];
|
var tags = [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue