basnijholt / adaptive-lighting

Adaptive Lighting custom component for Home Assistant
https://basnijholt.github.io/adaptive-lighting/
Apache License 2.0
1.77k stars 131 forks source link

Unconventional sunrise and sunset times . #105

Open 00schteven opened 3 years ago

00schteven commented 3 years ago

I am trying to configure Adaptive lighting for my indoor garden. I would like lights to come on at 16:00 and off at 04:00. Setting manual Sunrise and sunset times in the configuration returns this error:

ValueError: Test: The sun events ('sunset', 'solar_noon', 'sunrise', 'solar_midnight') are not in the expected order. The Adaptive Lighting integration will not work! This might happen if your sunrise/sunset offset is too large or your manually set sunrise/sunset time is past/before noon/midnight.

I think I can set the server location or clock to a time zone more compatible, but it would be nice to maintain a local time zone for the rest of the system.

RubenKelevra commented 3 years ago

I agree, this should be possible and the verification code for the time input is probably too restrictive

basnijholt commented 3 years ago

I never considered this use case. It should indeed be possible to support this case.

th3w1zard1 commented 1 year ago

@00schteven I believe I've implemented this in #535

if someone could test, that'd be great!

b-rad15 commented 9 months ago

Been a while since this lol but I'm testing using this version now and it appears to be working

b-rad15 commented 9 months ago

Rebased #535 in #830