Newbie question here… Could not find answer I want…
I put a switch on my garage door to sense open/close. I want to send a notification when it opens and when it closes. Problem is that it keep sending open messages… I cannot include time with ‘for:’, since it can be open a random time. I did include that for close.
Any ideas to send just one notification?
alias: garage open
hide_entity: true
trigger:
platform: state
entity_id: switch.garagepoort
to: ‘on’
action:
service: notify.ios_iphone
data:
message: “garagepoort open!”
Yes, this is what I have now. I get two open messages AND a closed when I open the door! And closed + open when I close it… It is a CoCo switch. Should I use fire_event in the switch definition? I don’t understand that parameter.
alias: garage open
hide_entity: true
trigger:
platform: state
entity_id: switch.garagepoort
from: ‘off’
to: ‘on’
action:
service: notify.ios_iphone
data:
message: “garagepoort open!”
I’ve never used an RFXtrx switch myself so anything I say is guessing only. You could try to set fire_event: false and check if that works. I’d also try to add for for 2 seconds to “debounce the signal” a little.
If nothing of that helps I’d suggest you reformat your post (see blue box at top about syntax highlighting) so we can make sure there is nothing wrong with the indentation.