Closed npostman closed 11 months ago
The way this is intended to work, line by line:
This should then fire a template trigger, causing the wait_for_trigger operation to continue. To be honest: I personally don't use this script that often, so while it should work, I'm not quite sure whether it always will work.
Thanks for the explanation.. So both if's (2 and 3) have to be true in order to have the trigger fire? They function a bit like an AND statement? And when 1 of them is false, it does nothing?
I wonder then why it didn't work. It's also pretty tough to trouble shoot.. is there some kind of 'console.log' function you can use to print out debug data to review in the Show Trace section?
I was going to say: Try out the HA DevTools to see when it returns true. But...
I think I found a mistake. There should be an and
operator in the template which adds both checks together. So this is definitely a bug in the script 🤐
This should correctly run both checks and only return true if both checks pass. https://github.com/PimDoos/ha-sessy-examples/blob/79f28e73d2a5bd0c63bc9818c698a58f44b8a8b1/blueprints/script/sessy/sessy-full-charge.yaml#L140
https://github.com/PimDoos/ha-sessy-examples/blob/1369bc557be70edbd6d0f4bcf87a17f56d592d52/blueprints/script/sessy/sessy-full-charge.yaml#L137-L141
Hey Pim,
I used this part in a little bit altered script, but when both of my Sessys are full, this trigger does not fire, and I try to find out why. The script stops because of the timeout value, not because both states are 'battery_full'.
Can you briefly explain what you/the script does here?
Thanks in advance, Niels