Skip to content

Commit

Permalink
get sensor states
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 committed Jul 28, 2023
1 parent 1370d73 commit d92916d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/openevse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def handle_state_change(
manager = hass.data[DOMAIN][config_entry.entry_id][MANAGER]
grid_sensor = config_entry.data.get(CONF_GRID)
solar_sensor = config_entry.data.get(CONF_SOLAR)
grid = round(hass.states.get(grid_sensor))
solar = round(hass.states.get(solar_sensor))
grid = round(hass.states.get(grid_sensor).state)
solar = round(hass.states.get(solar_sensor).state)
invert = config_entry.data.get(CONF_INVERT)

if changed_entity in [grid_sensor, solar_sensor]:
Expand Down

0 comments on commit d92916d

Please sign in to comment.