hasscc / petkit

🐱 Petkit feeder components for HomeAssistant
Apache License 2.0
119 stars 16 forks source link

Pura Max can't use "cleanup" and "continue" #31

Open Chiunownow opened 1 year ago

Chiunownow commented 1 year ago

if i select "cleanup", not thing happent, no error log output. if select "continue", get error log


此错误来自自定义集成。

Logger: custom_components.petkit
Source: custom_components/petkit/__init__.py:769
Integration: Petkit (documentation, issues)
First occurred: 04:01:43 (1 occurrences)
Last logged: 04:01:43

Petkit device control failed: [{'id': 171881, 'type': 'continue', 'kv': '{"continue_action":0}'}, {'error': {'code': 2105, 'msg': '设备已停止运行,无法完成操作'}}]
phirestalker commented 1 year ago

It looks like you cannot select cleanup because it is already "selected" as the default option. Maybe continue is only accepted by the unit under certain states only. I have not tried continue, but the cleanup option also does nothing for me. I used it on my mobile so I know that selecting cleanup does not give haptic feedback while selecting maintenance does. This is how I formed my opinion that it is already "selected" and therefore ignored when selecting it again. This is similar to how select boxes on web forms work as well.

wynfred commented 1 year ago

workaround - change 0 to -1 on this line https://github.com/hasscc/petkit/blob/main/custom_components/petkit/__init__.py#L617 using file editor

legeantbleu commented 1 year ago

I did the correction but it doesn't work. No action works.