philip1986 / pimatic-led-light

A template for creating plugins
http://pimatic.org/
GNU General Public License v2.0
7 stars 13 forks source link

default state #70

Closed thost96 closed 6 years ago

thost96 commented 7 years ago

Hi, i'm using pimatic-led-ligth for my milight setup and when i'm restarting pimatic all of my milight devices get turned on.

It would be nice to implement a default state at startup. Is this possible?

mwittig commented 7 years ago

Sorry for the delay on answering this one.

The state at startup is set to the last known state as filed in the database. So, if you turn off the lights and then restart pimatic the light should stay turned off. Did you try this? EDIT: However, this does not work as expected as state handling for the power switch is buggy. See also #38, #54, #55 I'll look into the matter asap (maybe fixed by #66)

Besides that it would be possible to implement an optional default state which overrides the last state from database.

thost96 commented 7 years ago

I worked around this using a simple rule at startup, which turn the light off.

michbeck100 commented 7 years ago

This is definitely fixed with #66. Would be great if the PR gets merged some time

michbeck100 commented 7 years ago

66 was merged.

michbeck100 commented 6 years ago

@thost96 as #66 was merged, is the issue resolved for you?

thost96 commented 6 years ago

@michbeck100 yes, the issue is resolved for me ;-)