I decided to use this because I sometimes forget to set it to auto mode when I clean, so if I havenāt switched it for an hour, I switch it back on. The other reason I use it is to automatically disengage from the anti-snag function when it is enabled, or from the weight detection protection when it is enabled.
The method is not listed anywhere, but I was able to find it by looking through the source code of this extension.
There is a āCatLink: request_apiā in the service call of the development tool, and you first get the deviceID with this. Specifically, do the following
service: catlink.request_api
target:
entity_id: sensor.scooper_XXXXX_state # Any sensor entity in the account
data:
api: /token/device/union/list/sorted
params:
'type': 'NONE'
method: GET
throw: true
If successful, a json will be returned in the notification, and the id part of devices will be ādeviceIDā.
Using this deviceID, the following is done to change the mode.
service: catlink.request_api
target:
entity_id: sensor.scooper_XXXXX_state
data:
api: /token/device/changeMode
method: POST
throw: true
params:
workModel: "00"
deviceId: "XXXXXX"
The meaning used for mode is as follows
def modes(self):
return {
'00': 'auto',
'01': 'manual',
'02': 'time',
'03': 'empty',
}
Also, to instruct CATLINK to clean up, the following service call is made
service: catlink.request_api
target:
entity_id: sensor.scooper_XXXXX_state
data:
api: /token/device/actionCmd
params:
cmd: "01"
deviceId: "XXXXX"
method: POST_GET
MOD: It works with POST, but callback is an error, so I changed it to POST_GET.
The mode used here is as follows
def actions(self):
return {
'00': 'pause',
'01': 'start',
}
I am not the developer of this extension, but this is my most useful ācustom_componentsā .