doorbell sound

This commit is contained in:
Kristian Iver Berget 2024-08-15 23:16:54 +02:00
parent f58db13fe2
commit 2263d6475a
1 changed files with 8 additions and 1 deletions

View File

@ -59,7 +59,14 @@ async function handleCommand(roomId, event) {
const text = event["content"]["body"];
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 = [];