benleb / ad-automoli

💡 Fully automatic light management based on conditions like motion, illuminance, humidity, and other clever features
https://github.com/benleb/ad-automoli
MIT License
110 stars 29 forks source link

Dynamic daytimes #40

Closed freekeys closed 3 years ago

freekeys commented 4 years ago

I'd love to have the daytime adjustments be dynamic based on sunset time (e.g. sunset-1hr, sunset-30mins etc etc)

oscfor commented 4 years ago

Yeah, that would be great. Up in the north we have great difference in sunrise during the year.

sivastola commented 4 years ago

I'd love to see something like this as well. Here is how I used it in automations.yaml before I moved to automoli

id: aqara_motion2_an
  alias: BWM Aqara Motion2 Flurlicht An
  trigger:
  - entity_id: group.motiongroupflurlicht
    platform: state
    to: 'on'
  action:
  - entity_id: light.flurlicht
    service: homeassistant.turn_on
  condition:
    condition: or
    conditions:
    - condition: sun
      after: sunset
      after_offset: -01:00:00
    - condition: sun
      before: sunrise
      before_offset: 01:00:00

the important part is the condition-part maybe it helps

paviro commented 3 years ago

@freekeys @oscfor @sivastola if you want you can try my commit and report back if you run into any issues.

oscfor commented 3 years ago

@freekeys @oscfor @sivastola if you want you can try my commit and report back if you run into any issues.

Just switched both a wave and zigbee platform, so it will take a few days until I am stable enough to do real testing.

benleb commented 3 years ago

will check and probably merge this in the next 1-2 days

paviro commented 3 years ago

Any updates on this?

benleb commented 3 years ago

implemented by @paviro in #60 - thank you! 🎉

paviro commented 3 years ago

Thanks for merging! ☺️