Skip to content

Commit

Permalink
Merge pull request #127 from basbruss/126-automation-for-horizontal-s…
Browse files Browse the repository at this point in the history
…creens-from-somfy-only-works-on-ha-reboot

Add correct arguments to start time entity
  • Loading branch information
basbruss authored Apr 28, 2024
2 parents 48b98b3 + 343b8fb commit b064197
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/adaptive_cover/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,9 @@ def get_blind_data(self):
def after_start_time(self):
"""Check if time is after start time."""
if self.start_time_entity is not None:
time = get_datetime_from_state(get_safe_state(self.start_time_entity))
time = get_datetime_from_state(
get_safe_state(self.hass, self.start_time_entity)
)
now = dt.datetime.now(dt.UTC)
if now.date() == time.date():
return now >= time
Expand Down

0 comments on commit b064197

Please sign in to comment.