Skip to content

Commit

Permalink
Merge pull request #35 from RobertD502/workstate_fix
Browse files Browse the repository at this point in the history
Pura Max Workstate fix
  • Loading branch information
RobertD502 authored Aug 29, 2023
2 parents 93d14ee + 7b5f482 commit ffa42e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion custom_components/petkit/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"petkitaio==0.1.9",
"tzlocal>=4.2"
],
"version": "0.1.9"
"version": "0.1.9.1"
}
9 changes: 5 additions & 4 deletions custom_components/petkit/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2861,7 +2861,7 @@ def native_value(self) -> str:
work_process = work_state['workProcess']
if work_process / 10 == 1:
return 'cleaning_litter_box'
if int(floor((work_process / 10))) == 2:
elif int(floor((work_process / 10))) == 2:
if work_process % 10 == 2:
if 'safeWarn' in work_state:
if work_state['safeWarn'] != 0:
Expand All @@ -2877,9 +2877,9 @@ def native_value(self) -> str:
return 'cleaning_paused_pet_using'
else:
return 'cleaning_litter_box_paused'
if work_process / 10 == 3:
elif work_process / 10 == 3:
return 'resetting_device'
if int(floor((work_process / 10))) == 4:
elif int(floor((work_process / 10))) == 4:
if work_process % 10 == 2:
if 'safeWarn' in work_state:
if work_state['safeWarn'] != 0:
Expand All @@ -2895,7 +2895,8 @@ def native_value(self) -> str:
return 'paused_pet_using'
else:
return 'litter_box_paused'

else:
return 'cleaning_litter_box'
if work_state['workMode'] == 1:
work_process = work_state['workProcess']
if work_process / 10 == 1:
Expand Down

0 comments on commit ffa42e8

Please sign in to comment.