Skip to content

Commit

Permalink
2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zefau committed Aug 26, 2020
1 parent aad50ae commit b7113ca
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,17 +486,15 @@ This requires the ioBroker adapter ioBroker.telegram (https://github.com/iobroke
* Alexa and Telegram to notify on Opener Ringing state
*
*/
on({id: 'nuki-extended.0.openers.opener.state.ringStateUpdate', change: "any", ack: true}, function (obj) {
var value = obj.state.val;
var oldValue = obj.oldState.val;
if (getState("nuki-extended.0.openers.opener.state.ringState").val == true) {
setState("alexa2.0.Echo-Devices.#YOUR ALEXA ID#.Commands.speak"/*speak*/, ('Somebody is ringing the doorbell.'));
sendTo("telegram", "send", {
text: 'The doorbell has been pushed.'
});
let phrase = 'Somebody is ringing the doorbell.'; // Es hat an der Tür geklingelt
on({id: 'nuki-extended.0.openers.opener.state.ringStateUpdate', change: "any", ack: true}, function (s) {
let state= s && s.state;

if (state.val === true) {
setState("alexa2.0.Echo-Devices.#YOUR ALEXA ID#.Commands.speak"/*speak*/, phrase);
sendTo("telegram", "send", { text: phrase });
}
});

```


Expand Down

0 comments on commit b7113ca

Please sign in to comment.