Skip to content

Commit

Permalink
fix filter countdown days
Browse files Browse the repository at this point in the history
  • Loading branch information
hmn committed Nov 9, 2024
1 parent f51f517 commit 3e3c433
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/siku/api_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ async def _translate_response(self, data: dict) -> dict:
# Byte 1: Minutes (0...59)
# Byte 2: Hours (0...23)
# Byte 3: Days (0...181)
minutes = int(data[COMMAND_FILTER_TIMER][0:2], 16)
days = int(data[COMMAND_FILTER_TIMER][0:2], 16)
hours = int(data[COMMAND_FILTER_TIMER][2:4], 16)
days = int(data[COMMAND_FILTER_TIMER][4:6], 16)
minutes = int(data[COMMAND_FILTER_TIMER][4:6], 16)
filter_timer = int(minutes + hours * 60 + days * 24 * 60)
except KeyError:
filter_timer = 0
Expand Down

0 comments on commit 3e3c433

Please sign in to comment.