Skip to content

Commit

Permalink
Catch another web-socket error (#1174)
Browse files Browse the repository at this point in the history
* Catch another web-socket error

* [pre-commit.ci lite] apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
springfall2008 and pre-commit-ci-lite[bot] committed Jun 4, 2024
1 parent 9ba854d commit 410a743
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/predbat/predbat.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
if not "PRED_GLOBAL" in globals():
PRED_GLOBAL = {}

THIS_VERSION = "v7.22.0"
THIS_VERSION = "v7.22.1"
PREDBAT_FILES = ["predbat.py"]
TIME_FORMAT = "%Y-%m-%dT%H:%M:%S%z"
TIME_FORMAT_SECONDS = "%Y-%m-%dT%H:%M:%S.%f%z"
Expand Down Expand Up @@ -15556,7 +15556,7 @@ async def socketLoop(self):
if new_state:
self.update_state_item(new_state)
# Only trigger on value change or you get too many updates
if new_state.get("state", None) != old_state.get("state", None):
if not old_state or (new_state.get("state", None) != old_state.get("state", None)):
await self.base.trigger_watch_list(
new_state["entity_id"], event_data.get("attribute", None), event_data.get("old_state", None), new_state
)
Expand Down

0 comments on commit 410a743

Please sign in to comment.