reformat streelight code based on [#18]
Closed this issue · 0 comments
chicco785 commented
the flow should be:
- subscribe to command topic
- when command received to turn on light (e.g.
{ "light": { "power": "on" } }
):- turn on lights (a leave them on - the off control will be done with an external logic that ask to turn off)
- send ack to cmdexe topic (e.g.
{ "light": { "power": "ok" } }
) - update status attribute on attrs topic (e.g.
{ "powerState": "on" }
)
- when command received to turn off light (e.g.
{ "light": { "power": "off" } }
): - turn off lights
- send ack to cmdexe topic (e.g.
{ "light": { "power": "ok" } }
) - update status attribute on attrs topic (e.g.
{ "powerState": "off" }
)