samhstein / sp108e_ws2815

home assistant sp108e with ws2815 integration
58 stars 20 forks source link

Update WifiLedShopLight.py #3

Closed blind-coder closed 3 years ago

blind-coder commented 3 years ago

turn_on: Only toggle if not on already

turn_off: Only toggle if not off already

samhstein commented 3 years ago

hi,

not sure this is necessary, cant hurt, but it should know / keep the correct state and only have the option to turn on or turn off setup properly on the ui? that is that the ui should always have state right and call on / off....

blind-coder commented 3 years ago

The ui does have the state, but if you create an automation to "turn on" the light it shouldn't be necessary to check the state first, which isn't even possible if you chain multiple actions like "turn off phone deflection" and "turn on lights". You could do multiple automations, one for each action, but that would create additional maintenance overhead. Finally, it just feels unintuitive that an action to" turn on" the light would turn it off if it's on already. I spent a sizable account of an afternoon trying to figure out if my controller is broken :)

samhstein commented 3 years ago

never thought about automations..... ours our cove lights that just get used occasionally

blind-coder commented 3 years ago

I have my entire staircase illuminated with one of these, 15 steps with 26 LEDs each on a single sp108e. Works like a charm, but needed a lot of cabling and 4 distinct power lines. I turn these on automatically when someone comes home, or at night when one of two motion sensors gets triggered.

Thank you for merging :)