I have a Centralite home lighting system with an RS232 port. Another HA user has generously shared his code with me and I’m trying to enhance his custome component to include the Centralite scene functionality.
I have used this in my python code:
from homeassistant.components.scene import Scene
However, I’m not sure a HA scene matches what Centralite is doing. Simply, a Centralite scene is a list of lights that it should turn on/off as a group. It does not track the state of the scene. If a scene is triggered ON, then all of the lights associated with it turn on and vice versa for off, regardless of their previous states. A scene is turned on with a single text command via the RS232 port. A scene is turned off with a separate single text command via the RS232 port.
I have a scene showing up on my HA web ui and I can “activate” the scene and the lights turn on. There is no deactivate option and googling about it, I see comments that scenes don’t have a deactivate option.
Note: When the lights are turned on/off via the scene command, I do receive a status update back from the system via RS232 about the new state of the lights. So, I do always know the state of the lights.
I think there’s likely a couple of ways to do this, but I’m new to HA and my experience so far has been limited to this Centralite project. Any suggestions?