i was wondering if any of you had this same dilemma;
I’ve bought a new philips tv and since it is a smart tv, i wanted to intergrate it with pimatic.
We have a touch panel containing 2 buttons. When we go to bed, we press button B to switch everything off and button A is vice versa.
Now, the api only supports standby function.
If i would connect it to button A(pir sensor;via rules) which turns everything on, and press it when the tv is on, it would turn on the lights and put the tv in standby.
What would be the best way to avoid that issue?
I currently grab the state with a shellsensor, and use that output (“On” or “Standby”) in my rules.
Since tv reports that it is on, no need to toggle it:
When buttona is present and if $tvstate.tvstate = "On" Then Switch all lights on
When the tv is standby:
When buttona is present and if $tvstate.tvstate = "Standby" Then Switch all lights on and execute "my code to turn it on"
Is this the best approach? How would you guys do this?