Hi! I’m a total newbie on Home Assistant. I managed to do lot’s with it, but I’m struggling with a problem.
I apologize right now, but not only English is not my native language, it’s easy to get confused when trying to explain in written words what I am trying to do.
So, I have an automation that runs at a specific time, and that automation turns off some lights in the house.
Due to my Wifi not being very reliable, at least that’s what I think the reason is, sometimes, not very often, some lights don’t get turned off.
So I started to see of a way to get a message if any of the lights stayed on after the automation executed.
I was looking to something like this example, I thought it was exactly what I needed. But I fail to get it to work:
Then I thought I should go the simple way, I created another automation, that runs few minutes after the one I mentioned, and what it does is so simple I don’t understand why it’s not working. I make 4 If conditions checking the lights one by one, if any of them is on, I send a message.
Problem is, for example, if light number 2 in the test is on I get a message and the automation does not test the others, number 3 and 4…
I thought the mode option was the solution, but from reading the documentation I think it’s not because it only reschedules or restarts the automation.
Here is the code for the automation:
alias: Check Lights Out
description: Cheks if all lights really went off
trigger:
- platform: time
at: "00:01:00"
condition: []
action:
- if:
- condition: device
type: is_on
device_id: 42e07ffd683289694123b80fd640ebee
entity_id: ab37a1d6f5a7b6fcf9f25fafcd70d26e
domain: switch
then:
- service: notify.mobile_app_x52x
data:
message: Luz Abrigo Exterior não apagou!!
- if:
- condition: device
type: is_on
device_id: 100d9fffe8e5b879144f977bc1358b00
entity_id: 9a03dcce7febb7be69677245e1fe5008
domain: switch
then:
- service: notify.mobile_app_x52x
data:
message: Luz perimetro não apagou!!
- if:
- condition: device
type: is_on
device_id: a79b1683f2b256b37bf88bb4cb9c65ae
entity_id: b88bf1331b8e25864ea984e40ee4cf94
domain: switch
then:
- service: notify.mobile_app_x52x
data:
message: "Luz alpendre canto não apagou!! "
- if:
- condition: device
type: is_on
device_id: 39c9f9bb6c2af0e71c9bc4d4f0e438eb
entity_id: a5bc85045cc0635dab63343e340e07ad
domain: switch
then:
- service: notify.mobile_app_x52x
data:
message: Luz alpendre janela não apagou!!
mode: single
Can anyone help me? Thank in advance!