Hello,
I get a message when the window is opened at a certain time (change off to on). But I don’t want that. I’d like a message when the window is already open at a certain time, so not when something changes.
alias: "Telegram: Fenster Bad EG"
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.fenster_bad_eg_2
from: "off"
to: "on"
condition:
- condition: time
before: "07:00:00"
after: "19:00:00"
weekday:
- sun
- mon
- tue
- wed
- thu
- fri
- sat
action:
- service: telegram_bot.send_message
data:
message: Fenster Badezimmer EG ist offen.
- service: notify.karina_telegram
data:
message: Fenster Badezimmer EG ist offen.
mode: single
trigger:
- platform: state
entity_id:
- binary_sensor.fenster_bad_eg_2
from: "off"
to: "on"
for:
hours: 0
minutes: 5
seconds: 0
This would trigger, if binary_sensor.fenster_bad_eg_2 changed from off to on and stayed on for 5 minutes (“Fenster Badezimmer EG seit 5 Minuten geöffnet”).
do I need two rules per window to be able to do this?
1: Message if window open after 6pm
2: Message if the window was closed after 6:00 p.m. an is opend between 6.00 p.m and 6.00 a.m.
I have the following two rules:
1:
alias: "Telegram: Fenster Büro Matthias Nord"
description: Nachricht, wenn Fenster nach 18.00 bereits offen war
trigger:
- platform: time
at: "18:00:00"
condition:
- condition: state
entity_id: binary_sensor.fenster_buro_matthias_nord_2
state: "on"
action:
- service: telegram_bot.send_message
data:
message: Fenster Büro Matthias ist offen.
- service: notify.karina_telegram
data:
message: Fenster Badezimmer EG ist offen.
enabled: false
2:
alias: "Telegram: Fenster Bad EG"
description: "Nachricht, wenn Fenster nach 19.00 geöffnet wird."
trigger:
- platform: state
entity_id:
- binary_sensor.fenster_bad_eg_2
from: "off"
to: "on"
condition:
- condition: time
before: "07:00:00"
after: "19:00:00"
weekday:
- sun
- mon
- tue
- wed
- thu
- fri
- sat
action:
- service: notify.alexa_media_echo_wohnzimmer
data:
message: test
- service: notify.karina_telegram
data:
message: Fenster Badezimmer EG ist offen.
enabled: false
mode: single