#Sure It s just a matter of boolean logic
1 messages · Page 1 of 1 (latest)
Thanks for the response. I'm not sure I understand what you mean here - individually it's trivial for me to have the blinds run on a schedule or to have the blinds be driven by the TV. I have all of those automations fully working. It's the intersection of them - in particular having TV power off return to the correct state per the schedule - that I don't see a good path to.
Obviously I could have logic in automation triggered by power off that knows the schedule, but then I've programmed the schedule twice and that's a bit of a bummer.
In my head, the ideal path to this is having the schedule establish some sort of baseline state that is triggered immediately if nothing is overriding it. Then TV power on can force the state away from baseline and TV power off can return to baseline. If baseline is updated in the background then the state it returns to is just a different state than the state from which it departed.
There are 2 main approaches:
- Use a scene to record the blind state before changing, then trigger a change in the blinds based on the TV turning on. When the TV turns off, restore the blind state based on the scene.
- Exhaustively enumerate all possible combinations of time periods and TV on/off states and the blind states that they will lead to.
I personally prefer 2 as 1 may lead to incorrect edge cases (eg. The scenario you described in the main channel). For 2, you can save yourself some trouble by hiererchicalising the conditions efficiently. Eg. If you check for time period first, in those periods where the blinds are supposed to be fully closed anyway, then the state of the TV is irrelevant.