From 31e494e2602431b7ec2b7e4b509c8ee4fd5d9dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Jim=C3=A9nez?= Date: Sat, 18 Jan 2025 00:42:59 +0100 Subject: [PATCH 1/5] Add support for PetSnowy Snow+ cat litter --- .../devices/petsnowy_snowplus_catlitter.yaml | 214 ++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml diff --git a/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml b/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml new file mode 100644 index 0000000000..1d449ce11f --- /dev/null +++ b/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml @@ -0,0 +1,214 @@ +name: Cat litter box +products: + - id: bdfimkssp9ews36b + manufacturer: PetSnowy + model: Snow+ +entities: + - entity: switch + name: Auto clean + category: config + icon: "mdi:flower" + dps: + - id: 4 + type: boolean + name: switch + - entity: number + name: Clean wait time + category: config + class: duration + icon: "mdi:timer" + dps: + - id: 5 + type: integer + name: sensor + unit: min + range: + min: 2 + max: 60 + mapping: + - step: 2 + - entity: sensor + name: Cat weight + category: diagnostic + class: weight + dps: + - id: 6 + name: sensor + type: integer + unit: g + class: measurement + range: + min: 0 + max: 30000 + - entity: button + name: Manual clean + icon: "mdi:shimmer" + dps: + - id: 9 + type: boolean + name: button + - entity: switch + name: Do not disturb + icon: "mdi:power-sleep" + category: config + dps: + - id: 10 + type: boolean + name: switch + - id: 106 + type: string + optional: true + name: sensor + - entity: switch + name: Light + icon: "mdi:lightbulb" + category: config + dps: + - id: 16 + type: boolean + name: switch + - entity: button + name: Deodorization + icon: "mdi:tailwind" + dps: + - id: 17 + type: boolean + name: button + - entity: sensor + name: Notifications + class: enum + category: diagnostic + icon: "mdi:eye-circle-outline" + dps: + - id: 21 + name: sensor + type: bitfield + mapping: + - dps_val: 1 + value: Manual cleaning completed + - dps_val: 2 + value: Automatic cleaning completed + - dps_val: 4 + value: Timed cleaning completed + - dps_val: 8 + value: Manual cleaning canceled + - dps_val: 16 + value: Manual deodorization completed + - dps_val: 32 + value: Automatic deodorization completed + - dps_val: 64 + value: Timed deodorization completed + - dps_val: 128 + value: Emptying cat litter completed + - dps_val: 256 + value: Cat litter weight reset + - dps_val: 512 + value: Self-check normal + - dps_val: 1024 + value: Button locked + - dps_val: 2048 + value: Button unlocked + - dps_val: 4096 + value: Indicator light on + - dps_val: 8192 + value: Indicator light off + - dps_val: 16384 + value: Pause cleaning + - dps_val: 32768 + value: Sleep mode on + - dps_val: 65536 + value: Sleep mode off + - dps_val: 131072 + value: Cancel emptying cat litter + - dps_val: 262144 + value: Change cat litter + - value: Unknown + - entity: binary_sensor + class: problem + category: diagnostic + dps: + - id: 22 + name: sensor + type: bitfield + mapping: + - dps_val: 0 + value: false + - value: true + - id: 22 + name: description + type: bitfield + mapping: + - dps_val: 0 + value: OK + - dps_val: 1 + value: Top cover fault + - dps_val: 2 + value: Drawer fault + - dps_val: 4 + value: Drawer full + - dps_val: 8 + value: Stuck cat + - dps_val: 16 + value: Checking fault + - dps_val: 32 + value: Stay long + - dps_val: 64 + value: Trouble removal + - value: Unknown + - entity: sensor + name: Status + class: enum + category: diagnostic + dps: + - id: 24 + name: sensor + type: string + - entity: button + name: Filter reset + icon: "mdi:filter-cog" + dps: + - id: 101 + type: boolean + name: button + - entity: sensor + name: Filter life + category: diagnostic + class: duration + dps: + - id: 102 + name: sensor + type: integer + unit: day + range: + min: 0 + max: 60 + - entity: switch + name: Unlock physical buttons + icon: "mdi:lock-question" + category: config + dps: + - id: 104 + type: boolean + name: switch + - entity: switch + name: Automatic purity + icon: "mdi:scent" + category: config + dps: + - id: 107 + type: boolean + name: switch + - entity: button + name: Change cat litter + icon: "mdi:delete-empty" + dps: + - id: 109 + type: boolean + name: button + - entity: button + name: Ball reset + icon: "mdi:scale-balance" + dps: + - id: 112 + type: boolean + name: button From c05cb3af556b8e80843517db0e2cffb23db8c9ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Jim=C3=A9nez?= Date: Sat, 18 Jan 2025 03:10:02 +0100 Subject: [PATCH 2/5] Fix Clean wait time entity Change name --- .../tuya_local/devices/petsnowy_snowplus_catlitter.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml b/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml index 1d449ce11f..8eafeece3a 100644 --- a/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml +++ b/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml @@ -20,7 +20,7 @@ entities: dps: - id: 5 type: integer - name: sensor + name: value unit: min range: min: 2 From 19e89d8b14ee9e303263459c17f32c34673b0911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Jim=C3=A9nez?= Date: Sat, 18 Jan 2025 11:57:52 +0100 Subject: [PATCH 3/5] Fix enum class problem --- .../tuya_local/devices/petsnowy_snowplus_catlitter.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml b/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml index 8eafeece3a..00ced2e04b 100644 --- a/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml +++ b/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml @@ -76,7 +76,6 @@ entities: name: button - entity: sensor name: Notifications - class: enum category: diagnostic icon: "mdi:eye-circle-outline" dps: @@ -157,7 +156,6 @@ entities: - value: Unknown - entity: sensor name: Status - class: enum category: diagnostic dps: - id: 24 From 53aa0bc1d80f3eb159279164bc37cf78c293fe26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Jim=C3=A9nez?= Date: Sat, 18 Jan 2025 12:28:41 +0100 Subject: [PATCH 4/5] Revert "Fix enum class problem" This reverts commit 19e89d8b14ee9e303263459c17f32c34673b0911. --- .../tuya_local/devices/petsnowy_snowplus_catlitter.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml b/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml index 00ced2e04b..8eafeece3a 100644 --- a/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml +++ b/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml @@ -76,6 +76,7 @@ entities: name: button - entity: sensor name: Notifications + class: enum category: diagnostic icon: "mdi:eye-circle-outline" dps: @@ -156,6 +157,7 @@ entities: - value: Unknown - entity: sensor name: Status + class: enum category: diagnostic dps: - id: 24 From e87d8fcef78f57821bc979527fdafdf2fc130af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Jim=C3=A9nez?= Date: Sat, 18 Jan 2025 12:34:31 +0100 Subject: [PATCH 5/5] Fix enum class problem --- .../tuya_local/devices/petsnowy_snowplus_catlitter.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml b/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml index 8eafeece3a..41ad6b669f 100644 --- a/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml +++ b/custom_components/tuya_local/devices/petsnowy_snowplus_catlitter.yaml @@ -157,7 +157,6 @@ entities: - value: Unknown - entity: sensor name: Status - class: enum category: diagnostic dps: - id: 24