diff --git a/custom_components/petkit/manifest.json b/custom_components/petkit/manifest.json index 10e786c..cc48fca 100644 --- a/custom_components/petkit/manifest.json +++ b/custom_components/petkit/manifest.json @@ -14,5 +14,5 @@ "petkitaio==0.1.9", "tzlocal>=4.2" ], - "version": "0.1.9" + "version": "0.1.9.1" } diff --git a/custom_components/petkit/sensor.py b/custom_components/petkit/sensor.py index b099a5a..1f10500 100644 --- a/custom_components/petkit/sensor.py +++ b/custom_components/petkit/sensor.py @@ -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: @@ -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: @@ -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: