Skip to content

Commit

Permalink
Fix 2022.3.0 beta #95
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoLoco committed Mar 1, 2022
1 parent 08ddff4 commit 348d1eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/hilo/__init__.py
Expand Up @@ -415,13 +415,13 @@ def set_state(self, entity, state, new_attrs={}, keep_state=False, force=False):
attrs = {}
attrs["last_update"] = datetime.now()
else:
attrs = current.as_dict()["attributes"]
attrs = current.as_dict()["attributes"]
LOG.debug(f"Setting state {params} {current}")
attrs = {**attrs, **new_attrs}
attrs = {**attrs, **new_attrs}
if keep_state and current:
state = current.state
state = current.state
if "Cost" in attrs:
attrs["Cost"] = state
attrs["Cost"] = state
self._hass.states.async_set(entity, state, attrs)

@property
Expand Down

0 comments on commit 348d1eb

Please sign in to comment.