Hi, I have a problem with state-based automations like these two, can you help me?
- id: accesspoint_down
alias: 'Unifi Access Point Down'
trigger:
platform: state
entity_id: device_tracker.uap_ac_lr
from: 'home'
to: 'not_home'
action:
service: notify.ha_notifiche
data:
message: 'UNIFI Access Point AC LR'
- id: '1547156414133'
alias: Notifica Apertura Finestra Camera
trigger:
- entity_id: binary_sensor.finestra_camera
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
message: Si è aperta la finestra della camera
service: notify.ha_notifiche
And what is your problem? Do you get an error? Please format your code correctly, like this we can not see if you have indetation errors. Mark the code and press the button </>.
Not sure about the notifications, neither call a service (canât check at the moment) But the second automation has no trigger platform
Yes it does, weird AE formatting strikes again !
Do other automations with telegram work? Do you get any errors in Developer Tools -> Logs?
If you put something else as an action, e.g. turning on a light, does the automation work?
Burning, Iâve learnt something today (thank you)
You pointed out that you can highlight already entered text and then âpreformatâ it.
Hence the like
Ok thatâs good. I meanât replacing the notification action in these two automations with turning on a light, to see wether the problem is the telegram notification or the automation in general.
Could you please also provide the code of one of the working telegram notification automations?
Do you see nothing in the log when the event happens?
these are the automation for the light, but I donât receive any error
- id: '1525464308767'
alias: Accensione Luce Letto
trigger:
- entity_id: light.luce_letto
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
message: La luce del letto si è accesa
service: notify.ha_notifiche
- id: '1547156414133'
alias: Notifica Apertura Finestra Camera
trigger:
- entity_id: binary_sensor.finestra_camera
from: 'off'
platform: state
to: 'on'
condition: []
action:
- data:
message: Si è aperta la finestra della camera
service: notify.ha_notifiche
To this:
- id: '1547156414133'
alias: Notifica Apertura Finestra Camera
trigger:
- entity_id: binary_sensor.finestra_camera
from: 'off'
platform: state
to: 'on'
condition: []
action:
- entity_id: light.luce_letto
service: light.turn_on
And see if the light.luce_letto turns on when binary_sensor.finestra_camera changes from âoffâ to âonâ. This way I can see if the automation works and itâs just the telegram notification that is not working or if the automation doesnât work at all.