Skip to content

Commit

Permalink
Merge pull request #324 from danobot/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
danobot authored Mar 19, 2024
2 parents 01624f8 + 2f665d5 commit e4a3f55
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# :wave: Introduction
Entity Controller (EC) is an implementation of "When This, Then That for x amount of time" using a finite state machine that ensures basic automations do not interfere with the rest of your home automation setup. This component encapsulates common automation scenarios into a neat package that can be configured easily and reused throughout your home. Traditional automations would need to be duplicated _for each instance_ in your config. The use cases for this component are endless because you can use any entity as input and outputs (there is no restriction to motion sensors and lights).

**Latest stable version is `v9.4.0` tested on Home Assistant `2022.7.4`.**

[Entity Controller Documentation](https://danobot.github.io/ec-docs/)

## Installation
Expand Down
15 changes: 11 additions & 4 deletions custom_components/entity_controller/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@
async def async_setup(hass, config):
"""Load graph configurations."""

if(str(((datetime.now()).astimezone()).tzinfo) != str(dt.as_local(dt.now()).tzname())):
_LOGGER.error("Timezones do not Match. Mismatched timezones may cause unintended behaviours.")
_LOGGER.error("System DateTime: %s", ((datetime.now()).astimezone()).tzinfo )
_LOGGER.error("Home Assistant DateTime: %s", dt.as_local(dt.now()).tzname())

component = EntityComponent(_LOGGER, DOMAIN, hass)

_LOGGER.info(
Expand Down Expand Up @@ -769,7 +774,8 @@ def _override_entity_state(self):
e, ex
)
)
return None

continue

if self.matches(state, self.OVERRIDE_ON_STATE):
self.log.debug("Override entities are ON. [%s]", e)
Expand Down Expand Up @@ -799,7 +805,8 @@ def _sensor_entity_state(self):
e, ex
)
)
return None

continue

if self.matches(state, self.SENSOR_ON_STATE):
self.log.debug("Sensor entities are ON. [%s]", e)
Expand All @@ -825,8 +832,8 @@ def _state_entity_state(self):
e, ex
)
)
state = 'off'
return None

continue

if self.matches(state, self.STATE_ON_STATE):
self.log.debug("State entities are ON. [%s]", e)
Expand Down

0 comments on commit e4a3f55

Please sign in to comment.