Open mattsaxon opened 2 years ago
yeah i used to do this, but then all the media_player buttons are inactive, so you have to manually turn the smart switch on, wait until it recieves a status message and becomes available. its quite important i power of the speakercraft unit when not in use but can turn it on, through the media_player
However when we havent recieved a message in a while, we could update the status on the zones to off.
i suppose this could be a config option - go unavailable or not.
I agree, I think this could be configurable. In your setup, so long as the smart plug is available, the zones are "just off", whereas if you don't have a smart plug, then the zones should be "unavailable".
ok, so that means leaving the power target in the config, and handling the smart plug from the component.
Yes, I think the power target needs to be in the config as it is today to achieve what I say above.
The concept you have working makes sense to me for sure, and the penny hadn't quite dropped till this discussion.
Though I'm not sure the code is as clear or simple as it could be.... I have to state that this is perhaps because I haven't given it enough thought at this stage, so I just leave this note here as an aide memoire to me giving it that bit more thought.
yeah the way it works is very confusing - and to be honest it isnt working right. im seeing odd behavour.
Im going to redo the way it works. but keep it in the component.
ok now the master power is working much better, the way i see this working is, to watch is no serial is recieved for 5 seconds. If not then the media_players should go to off. If there is a smart switch (power_target) defined, then they should remain off, and if there isnt a smart switch they should goto unavailable.
Agree with above
Absense of messages on RS232 could be used to mark integration as "Unavailable" in the front end.
Though this might impact how we do Master-On