From 0d0383824693dc57575a1193c4d7ad2cc0e892a7 Mon Sep 17 00:00:00 2001 From: Edison Montes M Date: Wed, 31 Jan 2024 17:51:00 -0300 Subject: [PATCH 01/74] Create smart_surge_protector_plug_2x2.yaml Smart Surge Protector Plug 2x2 by Nexxt --- .../smart_surge_protector_plug_2x2.yaml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 custom_components/tuya_local/devices/smart_surge_protector_plug_2x2.yaml diff --git a/custom_components/tuya_local/devices/smart_surge_protector_plug_2x2.yaml b/custom_components/tuya_local/devices/smart_surge_protector_plug_2x2.yaml new file mode 100644 index 0000000000..3070eb0a2f --- /dev/null +++ b/custom_components/tuya_local/devices/smart_surge_protector_plug_2x2.yaml @@ -0,0 +1,90 @@ +name: Smart Surge Protector Plug 2x2 +products: + - id: cianx1tz1ifyvyqm + name: Smart Surge Protector Plug 2x2 +primary_entity: + entity: switch + name: switch_1 + dps: + - id: 1 + name: switch + type: boolean +secondary_entities: + - entity: switch + name: switch_2 + dps: + - id: 2 + name: switch + type: boolean + - entity: switch + name: switch_usb1 + dps: + - id: 7 + name: switch + type: boolean + - entity: switch + name: switch_usb2 + dps: + - id: 8 + name: switch + type: boolean + - entity: number + name: countdown_1 + icon: "mdi:timer" + category: config + dps: + - id: 9 + name: value + type: integer + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: number + name: countdown_2 + icon: "mdi:timer" + category: config + dps: + - id: 10 + name: value + type: integer + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: number + name: countdown_usb1 + icon: "mdi:timer" + category: config + dps: + - id: 15 + name: value + type: integer + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: number + name: countdown_usb2 + icon: "mdi:timer" + category: config + dps: + - id: 16 + name: value + type: integer + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 From b46791587312a4ef928c05c6c840733948fd0400 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 3 Feb 2024 14:38:00 +0800 Subject: [PATCH 02/74] Surge protector 2x2: update naming Use human readable names for entity names, update top level name to not assume an identical device (but assume two groups of switches are outlet + USB seems reasonable as an assumption given common Tuya dp allocation convention) --- .../smart_surge_protector_plug_2x2.yaml | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/custom_components/tuya_local/devices/smart_surge_protector_plug_2x2.yaml b/custom_components/tuya_local/devices/smart_surge_protector_plug_2x2.yaml index 3070eb0a2f..99c179317d 100644 --- a/custom_components/tuya_local/devices/smart_surge_protector_plug_2x2.yaml +++ b/custom_components/tuya_local/devices/smart_surge_protector_plug_2x2.yaml @@ -1,35 +1,37 @@ -name: Smart Surge Protector Plug 2x2 +name: Two outlet two USB smartplug products: - id: cianx1tz1ifyvyqm - name: Smart Surge Protector Plug 2x2 + name: Surge protector plug 2x2 primary_entity: entity: switch - name: switch_1 + class: outlet + name: Outlet 1 dps: - id: 1 name: switch type: boolean secondary_entities: - entity: switch - name: switch_2 + class: outlet + name: Outlet 2 dps: - id: 2 name: switch type: boolean - entity: switch - name: switch_usb1 + name: USB 1 dps: - id: 7 name: switch type: boolean - entity: switch - name: switch_usb2 + name: USB 2 dps: - id: 8 name: switch type: boolean - entity: number - name: countdown_1 + name: Timer 1 icon: "mdi:timer" category: config dps: @@ -44,7 +46,7 @@ secondary_entities: - scale: 60 step: 60 - entity: number - name: countdown_2 + name: Timer 2 icon: "mdi:timer" category: config dps: @@ -59,7 +61,7 @@ secondary_entities: - scale: 60 step: 60 - entity: number - name: countdown_usb1 + name: Timer USB 1 icon: "mdi:timer" category: config dps: @@ -74,7 +76,7 @@ secondary_entities: - scale: 60 step: 60 - entity: number - name: countdown_usb2 + name: Timer USB 2 icon: "mdi:timer" category: config dps: From e4d2672c31c52042c048d6d34a851d9057102632 Mon Sep 17 00:00:00 2001 From: a-r-j-a-n Date: Wed, 31 Jan 2024 11:40:59 +0100 Subject: [PATCH 03/74] Create poolex_arctic_action.yaml Initial commit for the Poolex Arctic Action --- .../devices/poolex_arctic_action.yaml | 269 ++++++++++++++++++ 1 file changed, 269 insertions(+) create mode 100644 custom_components/tuya_local/devices/poolex_arctic_action.yaml diff --git a/custom_components/tuya_local/devices/poolex_arctic_action.yaml b/custom_components/tuya_local/devices/poolex_arctic_action.yaml new file mode 100644 index 0000000000..b915286bca --- /dev/null +++ b/custom_components/tuya_local/devices/poolex_arctic_action.yaml @@ -0,0 +1,269 @@ +name: Pool heatpump +products: + - id: ea8w1w + name: Poolex Arctic Action +primary_entity: + entity: climate + icon: "mdi:hot-tub" + translation_key: pool_heatpump + dps: + - id: 1 + type: boolean + name: hvac_mode + mapping: + - dps_val: false + value: "off" + - dps_val: true + constraint: preset_mode + conditions: + - dps_val: Heat_Intelligent + value: heat + - dps_val: Heat_Powerful + value: h_powerful + - dps_val: Heat_Energy_Saving + value: h_silent + - dps_val: Cool_Intelligent + value: cool + - dps_val: Cool_Powerful + value: c_powerful + - dps_val: Cool_Silent + value: c_silent + - id: 2 + type: integer + name: temperature + range: + min: 5 + max: 40 + mapping: + - constraint: temperature_unit + conditions: + - dps_val: f + range: + min: 41 + max: 104 + value_redirect: temp_set_f + - id: 3 + type: integer + name: current_temperature + mapping: + - constraint: temperature_unit + conditions: + - dps_val: f + value_redirect: temp_current_f + - id: 4 + type: string + name: preset_mode + mapping: + - dps_val: Heat_Intelligent + icon: "mdi:hot-tub" + value: heat + - dps_val: Heat_Powerful + icon: "mdi:hot-tub" + value: h_powerful + - dps_val: Heat_Energy_Saving + icon: "mdi:hot-tub" + value: h_silent + - dps_val: Cool_Intelligent + value: cool + icon: "mdi:snowflake" + - dps_val: Cool_Powerful + icon: "mdi:snowflake" + value: c_powerful + icon: "mdi:snowflake" + - dps_val: Cool_Silent + value: c_silent + icon: "mdi:snowflake" + - id: 13 + type: string + name: temperature_unit + mapping: + - dps_val: c + value: C + - dps_val: f + value: F + - id: 14 + type: integer + name: temp_set_f + range: + min: 41 + max: 104 + hidden: true + optional: true + - id: 15 + type: integer + name: temp_current_f + hidden: true + optional: true + - id: 21 + type: integer + name: error + mapping: + - dps_val: 0 + value: "OK" + - dps_val: 4 + value: "Water Flow Protection" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 3 + value: "Water Flow Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 4 + value: "Frost Protection" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 5 + value: "High Pressure Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 6 + value: "Low Pressure Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 9 + value: "Main Board - Line Control Communication Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 10 + value: "Frequency Module and Main Board Communication Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 12 + value: "Exhaust Over High Protection" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 13 + value: "DC Fan Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 15 + value: "Inlet Water Temperature Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 16 External Coil Temperature Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 18 + value: "Exhaust Temperature Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 20 + value: "Frequency Module Abnormal Protection" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 21 + value: "Ambient Temperature Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 23 + value: "Cooling Water Temperature Too Low Protection" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 27 + value: "Outlet Water Temperature Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 29 + value: "Return Gas Temperature Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 32 + value: "Heating Water Temperature Too High Protection" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 33 + value: "Outdoor Coil High Temperature Protection" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 35 + value: "Compressor Current Protection" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + - dps_val: 42 + value: "Internal Coil Temperature Fault" + icon: "mdi:water-boiler-alert" + icon_priority: 2 + + +secondary_entities: + - entity: water_heater + icon: "mdi:hot-tub" + deprecated: climate + category: config + dps: + - id: 1 + type: boolean + name: operation_mode + mapping: + - dps_val: false + value: "off" + - dps_val: true + value: heatpump + - id: 2 + type: integer + name: temperature + range: + min: 5 + max: 40 + mapping: + - constraint: temperature_unit + conditions: + - dps_val: f + range: + min: 41 + max: 104 + value_redirect: temp_set_f + - id: 3 + type: integer + name: current_temperature + mapping: + - constraint: temperature_unit + conditions: + - dps_val: f + value_redirect: temp_current_f + - id: 13 + type: string + name: temperature_unit + mapping: + - dps_val: c + value: C + - dps_val: f + value: F + - id: 14 + type: integer + name: temp_set_f + range: + min: 41 + max: 104 + hidden: true + optional: true + - id: 15 + type: integer + name: temp_current_f + hidden: true + optional: true + - entity: select + name: Temperature unit + icon: "mdi:temperature-celsius" + category: config + dps: + - id: 13 + type: string + name: option + mapping: + - dps_val: c + value: Celsius + - dps_val: f + value: Fahrenheit + - entity: binary_sensor + name: Status + class: running + category: diagnostic + dps: + - id: 1 + type: string + name: sensor + mapping: + - value: true + dps_val: heating + - value: false From 987e8d5c323c0e0c4a4d6c0f5d7fe8b0f2c98104 Mon Sep 17 00:00:00 2001 From: a-r-j-a-n Date: Wed, 31 Jan 2024 15:04:36 +0100 Subject: [PATCH 04/74] Update poolex_arctic_action.yaml Fixed linting issues --- .../tuya_local/devices/poolex_arctic_action.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/custom_components/tuya_local/devices/poolex_arctic_action.yaml b/custom_components/tuya_local/devices/poolex_arctic_action.yaml index b915286bca..5b2acf0b9d 100644 --- a/custom_components/tuya_local/devices/poolex_arctic_action.yaml +++ b/custom_components/tuya_local/devices/poolex_arctic_action.yaml @@ -67,7 +67,6 @@ primary_entity: value: cool icon: "mdi:snowflake" - dps_val: Cool_Powerful - icon: "mdi:snowflake" value: c_powerful icon: "mdi:snowflake" - dps_val: Cool_Silent @@ -147,7 +146,7 @@ primary_entity: value: "Exhaust Temperature Fault" icon: "mdi:water-boiler-alert" icon_priority: 2 - - dps_val: 20 + - dps_val: 20 value: "Frequency Module Abnormal Protection" icon: "mdi:water-boiler-alert" icon_priority: 2 @@ -155,7 +154,7 @@ primary_entity: value: "Ambient Temperature Fault" icon: "mdi:water-boiler-alert" icon_priority: 2 - - dps_val: 23 + - dps_val: 23 value: "Cooling Water Temperature Too Low Protection" icon: "mdi:water-boiler-alert" icon_priority: 2 @@ -163,7 +162,7 @@ primary_entity: value: "Outlet Water Temperature Fault" icon: "mdi:water-boiler-alert" icon_priority: 2 - - dps_val: 29 + - dps_val: 29 value: "Return Gas Temperature Fault" icon: "mdi:water-boiler-alert" icon_priority: 2 @@ -184,7 +183,7 @@ primary_entity: icon: "mdi:water-boiler-alert" icon_priority: 2 - + secondary_entities: - entity: water_heater icon: "mdi:hot-tub" From 8a6b6cfbd2102c37d3ee6b72a40d695246f982e5 Mon Sep 17 00:00:00 2001 From: a-r-j-a-n Date: Wed, 31 Jan 2024 20:33:35 +0100 Subject: [PATCH 05/74] Update poolex_arctic_action.yaml Fixed based on feedback --- .../devices/poolex_arctic_action.yaml | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/custom_components/tuya_local/devices/poolex_arctic_action.yaml b/custom_components/tuya_local/devices/poolex_arctic_action.yaml index 5b2acf0b9d..c79e77b8bd 100644 --- a/custom_components/tuya_local/devices/poolex_arctic_action.yaml +++ b/custom_components/tuya_local/devices/poolex_arctic_action.yaml @@ -1,7 +1,6 @@ -name: Pool heatpump +name: Poolex Arctic Action products: - - id: ea8w1w - name: Poolex Arctic Action + - id: pzp8owd7lhtpssgj primary_entity: entity: climate icon: "mdi:hot-tub" @@ -19,15 +18,15 @@ primary_entity: - dps_val: Heat_Intelligent value: heat - dps_val: Heat_Powerful - value: h_powerful + value: heat - dps_val: Heat_Energy_Saving - value: h_silent + value: heat - dps_val: Cool_Intelligent value: cool - dps_val: Cool_Powerful - value: c_powerful + value: cool - dps_val: Cool_Silent - value: c_silent + value: cool - id: 2 type: integer name: temperature @@ -56,22 +55,22 @@ primary_entity: mapping: - dps_val: Heat_Intelligent icon: "mdi:hot-tub" - value: heat + value: smart_heat - dps_val: Heat_Powerful icon: "mdi:hot-tub" - value: h_powerful + value: quick_heat - dps_val: Heat_Energy_Saving icon: "mdi:hot-tub" - value: h_silent + value: quiet_heat - dps_val: Cool_Intelligent - value: cool icon: "mdi:snowflake" + value: smart_cool - dps_val: Cool_Powerful - value: c_powerful icon: "mdi:snowflake" + value: quick_cool - dps_val: Cool_Silent - value: c_silent icon: "mdi:snowflake" + value: quiet_cool - id: 13 type: string name: temperature_unit @@ -139,7 +138,8 @@ primary_entity: value: "Inlet Water Temperature Fault" icon: "mdi:water-boiler-alert" icon_priority: 2 - - dps_val: 16 External Coil Temperature Fault" + - dps_val: 16 + value: "External Coil Temperature Fault" icon: "mdi:water-boiler-alert" icon_priority: 2 - dps_val: 18 @@ -183,9 +183,8 @@ primary_entity: icon: "mdi:water-boiler-alert" icon_priority: 2 - secondary_entities: - - entity: water_heater + - entity: climate icon: "mdi:hot-tub" deprecated: climate category: config From cc631098dbea02e3c775623e85a05c48c3b51982 Mon Sep 17 00:00:00 2001 From: a-r-j-a-n Date: Sat, 3 Feb 2024 16:27:14 +0100 Subject: [PATCH 06/74] Update poolex_arctic_action.yaml Fixed main entity. Added diagnotic entity Added temperature unit config entry --- .../devices/poolex_arctic_action.yaml | 100 +++--------------- 1 file changed, 16 insertions(+), 84 deletions(-) diff --git a/custom_components/tuya_local/devices/poolex_arctic_action.yaml b/custom_components/tuya_local/devices/poolex_arctic_action.yaml index c79e77b8bd..44af807d7b 100644 --- a/custom_components/tuya_local/devices/poolex_arctic_action.yaml +++ b/custom_components/tuya_local/devices/poolex_arctic_action.yaml @@ -1,6 +1,7 @@ -name: Poolex Arctic Action +name: Spa Heat Pump products: - id: pzp8owd7lhtpssgj + name: Poolex Arctic Action primary_entity: entity: climate icon: "mdi:hot-tub" @@ -13,20 +14,7 @@ primary_entity: - dps_val: false value: "off" - dps_val: true - constraint: preset_mode - conditions: - - dps_val: Heat_Intelligent - value: heat - - dps_val: Heat_Powerful - value: heat - - dps_val: Heat_Energy_Saving - value: heat - - dps_val: Cool_Intelligent - value: cool - - dps_val: Cool_Powerful - value: cool - - dps_val: Cool_Silent - value: cool + value: "auto" - id: 2 type: integer name: temperature @@ -53,22 +41,22 @@ primary_entity: type: string name: preset_mode mapping: - - dps_val: Heat_Intelligent + - dps_val: heat icon: "mdi:hot-tub" value: smart_heat - - dps_val: Heat_Powerful + - dps_val: h_powerful icon: "mdi:hot-tub" value: quick_heat - - dps_val: Heat_Energy_Saving + - dps_val: h_silent icon: "mdi:hot-tub" value: quiet_heat - - dps_val: Cool_Intelligent + - dps_val: cool icon: "mdi:snowflake" value: smart_cool - - dps_val: Cool_Powerful + - dps_val: c_powerful icon: "mdi:snowflake" value: quick_cool - - dps_val: Cool_Silent + - dps_val: c_silent icon: "mdi:snowflake" value: quiet_cool - id: 13 @@ -93,7 +81,7 @@ primary_entity: hidden: true optional: true - id: 21 - type: integer + type: bitfield name: error mapping: - dps_val: 0 @@ -184,62 +172,6 @@ primary_entity: icon_priority: 2 secondary_entities: - - entity: climate - icon: "mdi:hot-tub" - deprecated: climate - category: config - dps: - - id: 1 - type: boolean - name: operation_mode - mapping: - - dps_val: false - value: "off" - - dps_val: true - value: heatpump - - id: 2 - type: integer - name: temperature - range: - min: 5 - max: 40 - mapping: - - constraint: temperature_unit - conditions: - - dps_val: f - range: - min: 41 - max: 104 - value_redirect: temp_set_f - - id: 3 - type: integer - name: current_temperature - mapping: - - constraint: temperature_unit - conditions: - - dps_val: f - value_redirect: temp_current_f - - id: 13 - type: string - name: temperature_unit - mapping: - - dps_val: c - value: C - - dps_val: f - value: F - - id: 14 - type: integer - name: temp_set_f - range: - min: 41 - max: 104 - hidden: true - optional: true - - id: 15 - type: integer - name: temp_current_f - hidden: true - optional: true - entity: select name: Temperature unit icon: "mdi:temperature-celsius" @@ -254,14 +186,14 @@ secondary_entities: - dps_val: f value: Fahrenheit - entity: binary_sensor - name: Status - class: running + class: problem + name: Fault category: diagnostic dps: - - id: 1 - type: string + - id: 21 + type: bitfield name: sensor mapping: + - dps_val: 0 + value: false - value: true - dps_val: heating - - value: false From a6c03b7921d62b93667b30710ec0d3000aa553ce Mon Sep 17 00:00:00 2001 From: TwoWheelPro <97080551+TwoWheelPro@users.noreply.github.com> Date: Thu, 25 Jan 2024 19:20:55 +0800 Subject: [PATCH 07/74] Add files via upload --- .../holman_wx8_irrigation_controller.yaml | 208 ++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml diff --git a/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml b/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml new file mode 100644 index 0000000000..b2d0f9cdfc --- /dev/null +++ b/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml @@ -0,0 +1,208 @@ +name: Holman WX8 +products: + - id: 3c8bxnseywh7radc + model: WX8 + manufacturer: Holman +primary_entity: + entity: sensor + name: Watering + dps: + - id: 123 + type: boolean +secondary_entities: + - entity: switch + name: Zone 1 + dps: + - id: 102 + type: boolean + name: switch + - entity: switch + name: Zone 2 + dps: + - id: 103 + type: boolean + name: switch + - entity: switch + name: Zone 3 + dps: + - id: 104 + type: boolean + name: switch + - entity: switch + name: Zone 4 + dps: + - id: 104 + type: boolean + name: switch + - entity: switch + name: Zone 5 + dps: + - id: 106 + type: boolean + name: switch + - entity: switch + name: Zone 6 + dps: + - id: 107 + type: boolean + name: switch + - entity: switch + name: Zone 7 + dps: + - id: 108 + type: boolean + name: switch + - entity: switch + name: Zone 8 + dps: + - id: 112 + type: boolean + name: switch + - entity: switch + name: Start A + dps: + - id: 113 + type: boolean + name: switch + - entity: switch + name: Start B + dps: + - id: 114 + type: boolean + name: switch + - entity: switch + name: Start C + dps: + - id: 115 + type: boolean + name: switch + - entity: sensor + name: Firmware Version + category: diagnostic + dps: + - id: 116 + name: sensor + type: integer + - entity: sensor + name: Power Supply Voltage + category: diagnostic + dps: + - id: 117 + name: sensor + type: integer + unit: "V" + mapping: + - scale: 10 + - entity: sensor + name: Battery Voltage + category: diagnostic + dps: + - id: 118 + type: integer + name: sensor + unit: "V" + mapping: + - scale: 10 + - entity: sensor + name: Catchup Voltage + category: diagnostic + dps: + - id: 119 + type: integer + name: sensor + unit: "V" + mapping: + - scale: 10 + - entity: sensor + name: Device Flag + category: diagnostic + # dps: + # - id: 120 + # type: bitfield + # name: sensor + dps: + - id: 120 + optional: true + name: 9V Battery Good + type: bitfield + mapping: + - mask: "F0000000" + # - id: 120 + # optional: true + # name: Watering + # type: boolean + # mapping: + # - mask: "00F00000" + # - id: 120 + # optional: true + # name: Rain Sensor Wet + # type: boolean + # mapping: + # - mask: "000F0000" + # - id: 120 + # optional: true + # name: Evie Connected + # type: boolean + # mapping: + # - mask: "00000F00" + # - id: 120 + # optional: true + # name: Evie Battery Good + # type: boolean + # mapping: + # - mask: "000000F0" + # - id: 120 + # optional: true + # name: Evie Wet + # type: boolean + # mapping: + # - mask: "0000000F" + - entity: sensor + name: Time left + icon: "mdi:timer" + dps: + - id: 121 + type: integer + name: sensor + unit: min + - entity: sensor + name: Dial Position + class: enum + icon: "mdi:knob" + category: diagnostic + dps: + - id: 122 + type: integer + name: sensor + mapping: + - dps_val: 1 + value: "Zone 1" + - dps_val: 2 + value: "Zone 2" + - dps_val: 3 + value: "Zone 3" + - dps_val: 4 + value: "Zone 4" + - dps_val: 5 + value: "Zone 5" + - dps_val: 6 + value: "Zone 6" + - dps_val: 7 + value: "Zone 7" + - dps_val: 8 + value: "Zone 8" + - dps_val: 9 + value: "AP" + - dps_val: 10 + value: "Off" + - dps_val: 11 + value: "Run" + - dps_val: 12 + value: "Test" + - entity: binary_sensor + name: Master Valve + category: diagnostic + dps: + - id: 123 + type: boolean + name: sensor \ No newline at end of file From 79837f92a778ee348663a63880d60a96156e5768 Mon Sep 17 00:00:00 2001 From: TwoWheelPro <97080551+TwoWheelPro@users.noreply.github.com> Date: Fri, 26 Jan 2024 18:50:26 +0800 Subject: [PATCH 08/74] Add files via upload --- .../holman_wx8_irrigation_controller.yaml | 102 ++++++++++++------ 1 file changed, 67 insertions(+), 35 deletions(-) diff --git a/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml b/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml index b2d0f9cdfc..57c6719b6b 100644 --- a/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml +++ b/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml @@ -4,85 +4,102 @@ products: model: WX8 manufacturer: Holman primary_entity: - entity: sensor - name: Watering + entity: binary_sensor + name: Irrigation Controller + class: running + icon: mdi:sprinkler-variant dps: - id: 123 + name: sensor type: boolean + - id: 116 + name: Firmware Version + type: integer secondary_entities: +# ----- Value is encoded string, Value in Home assistant is unkown + # - entity: sensor + # name: Programming + # dps: + # - id: 101 + # name: sensor + # type: string - entity: switch name: Zone 1 + icon: mdi:sprinkler-variant dps: - id: 102 type: boolean name: switch - entity: switch name: Zone 2 + icon: mdi:sprinkler-variant dps: - id: 103 type: boolean name: switch - entity: switch name: Zone 3 + icon: mdi:sprinkler-variant dps: - id: 104 type: boolean name: switch - entity: switch name: Zone 4 + icon: mdi:sprinkler-variant dps: - id: 104 type: boolean name: switch - entity: switch name: Zone 5 + icon: mdi:sprinkler-variant dps: - id: 106 type: boolean name: switch - entity: switch name: Zone 6 + icon: mdi:sprinkler-variant dps: - id: 107 type: boolean name: switch - entity: switch name: Zone 7 + icon: mdi:sprinkler-variant dps: - id: 108 type: boolean name: switch - entity: switch name: Zone 8 + icon: mdi:sprinkler-variant dps: - id: 112 type: boolean name: switch - entity: switch - name: Start A + name: Start A # This is actually prgram A but Stat is the vendor terminology, stays on while programming is running can be stoped mid way. + icon: mdi:timetable dps: - id: 113 type: boolean name: switch - entity: switch name: Start B + icon: mdi:timetable dps: - id: 114 type: boolean name: switch - entity: switch name: Start C + icon: mdi:timetable dps: - id: 115 type: boolean name: switch - - entity: sensor - name: Firmware Version - category: diagnostic - dps: - - id: 116 - name: sensor - type: integer - entity: sensor name: Power Supply Voltage category: diagnostic @@ -113,48 +130,65 @@ secondary_entities: unit: "V" mapping: - scale: 10 - - entity: sensor - name: Device Flag - category: diagnostic + # - entity: binary_sensor ----- I can't work this one out, value shows as int in Home assistant, some work but with inverted value + # name: 9V Battery OK + # class: battery # dps: # - id: 120 - # type: bitfield # name: sensor - dps: - - id: 120 - optional: true - name: 9V Battery Good - type: bitfield - mapping: - - mask: "F0000000" + # type: base64 + # mapping: + # - mask: "F0000000" + # - dps_val: 1 + # value: 0 + # - dps_val: 0 + # value: 1 + # - entity: binary_sensor + # name: Watering + # dps: # - id: 120 - # optional: true - # name: Watering - # type: boolean + # name: sensor + # type: base64 # mapping: # - mask: "00F00000" + # - entity: binary_sensor + # name: Rain Sensor Wet + # class: moisture + # dps: # - id: 120 - # optional: true - # name: Rain Sensor Wet - # type: boolean + # name: sensor + # type: base64 # mapping: # - mask: "000F0000" + # - entity: binary_sensor + # name: Evie Connected + # category: diagnostic + # class: connectivity + # dps: # - id: 120 # optional: true - # name: Evie Connected - # type: boolean + # name: sensor + # type: base64 # mapping: # - mask: "00000F00" - # - id: 120 + # - entity: binary_sensor + # name: Evie Battery OK + # class: battery + # dps: + # - id: 120 # optional: true # name: Evie Battery Good - # type: boolean + # type: base64 # mapping: # - mask: "000000F0" - # - id: 120 + # - entity: binary_sensor + # name: Evie Sensor Wet + # class: moisture + # dps: + # - id: 120 # optional: true # name: Evie Wet - # type: boolean + # type: base64 # mapping: # - mask: "0000000F" - entity: sensor @@ -169,7 +203,6 @@ secondary_entities: name: Dial Position class: enum icon: "mdi:knob" - category: diagnostic dps: - id: 122 type: integer @@ -201,7 +234,6 @@ secondary_entities: value: "Test" - entity: binary_sensor name: Master Valve - category: diagnostic dps: - id: 123 type: boolean From f3a95b2a034dfd3958a12882dc0dfa8f14d9f0da Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 4 Feb 2024 09:57:16 +0800 Subject: [PATCH 09/74] Holman WX8: review changes - fix up mask usage, move some dps to attributes, fix naming. --- .../holman_wx8_irrigation_controller.yaml | 179 +++++++++--------- 1 file changed, 88 insertions(+), 91 deletions(-) diff --git a/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml b/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml index 57c6719b6b..54e9cdb2cb 100644 --- a/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml +++ b/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml @@ -1,11 +1,10 @@ -name: Holman WX8 +name: Irrigation Controller products: - id: 3c8bxnseywh7radc model: WX8 manufacturer: Holman primary_entity: entity: binary_sensor - name: Irrigation Controller class: running icon: mdi:sprinkler-variant dps: @@ -13,16 +12,13 @@ primary_entity: name: sensor type: boolean - id: 116 - name: Firmware Version + name: firmware_version type: integer + - id: 101 + name: programming + type: string + optional: true secondary_entities: -# ----- Value is encoded string, Value in Home assistant is unkown - # - entity: sensor - # name: Programming - # dps: - # - id: 101 - # name: sensor - # type: string - entity: switch name: Zone 1 icon: mdi:sprinkler-variant @@ -80,28 +76,29 @@ secondary_entities: type: boolean name: switch - entity: switch - name: Start A # This is actually prgram A but Stat is the vendor terminology, stays on while programming is running can be stoped mid way. + name: Program A # This is actually prgram A but Stat is the vendor terminology, stays on while programming is running can be stoped mid way. icon: mdi:timetable dps: - id: 113 type: boolean name: switch - entity: switch - name: Start B + name: Program B icon: mdi:timetable dps: - id: 114 type: boolean name: switch - entity: switch - name: Start C + name: Program C icon: mdi:timetable dps: - id: 115 type: boolean name: switch - entity: sensor - name: Power Supply Voltage + class: voltage + name: Power supply voltage category: diagnostic dps: - id: 117 @@ -110,8 +107,14 @@ secondary_entities: unit: "V" mapping: - scale: 10 + - id: 119 + name: catchup_voltage # not sure what this is exactly, and it does not show in the manual, so made an attribute + type: integer + mapping: + - scale: 10 - entity: sensor - name: Battery Voltage + name: Battery voltage + class: voltage category: diagnostic dps: - id: 118 @@ -120,87 +123,87 @@ secondary_entities: unit: "V" mapping: - scale: 10 - - entity: sensor - name: Catchup Voltage + - entity: binary_sensor + class: battery + dps: + - id: 120 + name: sensor + type: base64 + mapping: + - mask: "F0000000" + dps_val: 0 + value: true + - value: false + - entity: binary_sensor + name: Watering + dps: + - id: 120 + name: sensor + type: base64 + mapping: + - mask: "00F00000" + dps_val: 0 + value: false + - value: true + - entity: binary_sensor + name: Rain sensor + class: moisture + dps: + - id: 120 + name: sensor + type: base64 + mapping: + - mask: "000F0000" + dps_val: 0 + value: false + - value: true + - entity: binary_sensor + name: Evie connected category: diagnostic + class: connectivity dps: - - id: 119 - type: integer + - id: 120 name: sensor - unit: "V" + type: base64 mapping: - - scale: 10 - # - entity: binary_sensor ----- I can't work this one out, value shows as int in Home assistant, some work but with inverted value - # name: 9V Battery OK - # class: battery - # dps: - # - id: 120 - # name: sensor - # type: base64 - # mapping: - # - mask: "F0000000" - # - dps_val: 1 - # value: 0 - # - dps_val: 0 - # value: 1 - # - entity: binary_sensor - # name: Watering - # dps: - # - id: 120 - # name: sensor - # type: base64 - # mapping: - # - mask: "00F00000" - # - entity: binary_sensor - # name: Rain Sensor Wet - # class: moisture - # dps: - # - id: 120 - # name: sensor - # type: base64 - # mapping: - # - mask: "000F0000" - # - entity: binary_sensor - # name: Evie Connected - # category: diagnostic - # class: connectivity - # dps: - # - id: 120 - # optional: true - # name: sensor - # type: base64 - # mapping: - # - mask: "00000F00" - # - entity: binary_sensor - # name: Evie Battery OK - # class: battery - # dps: - # - id: 120 - # optional: true - # name: Evie Battery Good - # type: base64 - # mapping: - # - mask: "000000F0" - # - entity: binary_sensor - # name: Evie Sensor Wet - # class: moisture - # dps: - # - id: 120 - # optional: true - # name: Evie Wet - # type: base64 - # mapping: - # - mask: "0000000F" + - mask: "00000F00" + dps_val: 0 + value: false + - value: true + - entity: binary_sensor + name: Evie battery + class: battery + dps: + - id: 120 + name: sensor + type: base64 + mapping: + - mask: "000000F0" + dps_val: 0 + value: true + - value: false + - entity: binary_sensor + name: Evie sensor + class: moisture + dps: + - id: 120 + name: sensor + type: base64 + mapping: + - mask: "0000000F" + dps_val: 0 + value: false + - value: true - entity: sensor - name: Time left - icon: "mdi:timer" + name: Time remaining + class: duration dps: - id: 121 type: integer name: sensor unit: min - entity: sensor - name: Dial Position + name: Dial position class: enum icon: "mdi:knob" dps: @@ -232,9 +235,3 @@ secondary_entities: value: "Run" - dps_val: 12 value: "Test" - - entity: binary_sensor - name: Master Valve - dps: - - id: 123 - type: boolean - name: sensor \ No newline at end of file From dc040ea8becb68ac2e7712f632d13d9e8a133567 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 4 Feb 2024 10:02:04 +0800 Subject: [PATCH 10/74] Holman WX8: lint fixes Remove trailing space and reduce long comments. --- .../devices/holman_wx8_irrigation_controller.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml b/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml index 54e9cdb2cb..8325a54394 100644 --- a/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml +++ b/custom_components/tuya_local/devices/holman_wx8_irrigation_controller.yaml @@ -39,7 +39,7 @@ secondary_entities: dps: - id: 104 type: boolean - name: switch + name: switch - entity: switch name: Zone 4 icon: mdi:sprinkler-variant @@ -53,14 +53,14 @@ secondary_entities: dps: - id: 106 type: boolean - name: switch + name: switch - entity: switch name: Zone 6 icon: mdi:sprinkler-variant dps: - id: 107 type: boolean - name: switch + name: switch - entity: switch name: Zone 7 icon: mdi:sprinkler-variant @@ -76,7 +76,7 @@ secondary_entities: type: boolean name: switch - entity: switch - name: Program A # This is actually prgram A but Stat is the vendor terminology, stays on while programming is running can be stoped mid way. + name: Program A icon: mdi:timetable dps: - id: 113 @@ -95,7 +95,7 @@ secondary_entities: dps: - id: 115 type: boolean - name: switch + name: switch - entity: sensor class: voltage name: Power supply voltage @@ -108,7 +108,7 @@ secondary_entities: mapping: - scale: 10 - id: 119 - name: catchup_voltage # not sure what this is exactly, and it does not show in the manual, so made an attribute + name: catchup_voltage # not sure what this is, so made an attribute type: integer mapping: - scale: 10 @@ -175,7 +175,7 @@ secondary_entities: class: battery dps: - id: 120 - name: sensor + name: sensor type: base64 mapping: - mask: "000000F0" From 55fe02c30284f907f90ba92532827e3a2950fa89 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 4 Feb 2024 10:40:15 +0800 Subject: [PATCH 11/74] Docs for recent PRs PR #1566, #1582, #1584 --- ACKNOWLEDGEMENTS.md | 3 +++ DEVICES.md | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index cbd37a4764..6ecfcfe3b5 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -476,3 +476,6 @@ Further device support has been made with the assistance of users. Please consid - [ceinmart](https://github.com/ceinmart) for assisting with support for Moes 4-gang switches. - [mihasybn](https://github.com/mihasybn) for assisting with support for Idea Heating Belt air conditioners. - [feeling001](https://github.com/feeling001) for contributing support for EcoPoint EV chargers. +- [a-r-j-a-n](https://github.com/a-r-j-a-n) for contributing support for Poolex Arctic spa pool heatpumps. +- [Geek-MD](https://github.com/Geek-MD) for contributing support for generic 2 outlet + 2 USB smartplugs. +- [TwoWheelPro](https://github.com/TwoWheelPro) for contributing support for Holman WX8 irrigation controllers. diff --git a/DEVICES.md b/DEVICES.md index d55baa03b6..22d457129b 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -99,7 +99,7 @@ - Madimack Eco pool heatpump - Madimack Elite V3 pool heatpump - Madimack(model unknown) pool heatpump (seems to match Fairland IPH45 as well) -- Poolex Silverline, Q-7, Q-line and Vertigo heatpumps +- Poolex Silverline, Q-7, Q-line, Arctic and Vertigo heatpumps - Remora pool heatpump - W'eau pool heatpump (simple model and a more complex 13kW model) @@ -390,6 +390,7 @@ generic configurations that basically follow Tuya's templates with different features enabled, so are known to work with multiple brands of device. +- 2 outlet plus 2 USB smartplug with individual timers - 4 way power monitoring strip (2 types) _confirmed as working with Kogan KASPS10A3P3UA 3 socket + USB powerstrip_ - 4 way powerstrip with USB @@ -596,6 +597,7 @@ port and password. - Haier Nayun NY-GS-04 combustible gas alarm - Holman WX1 tap timer (sprinkler controller) - Holman WX2 dual tap timer +- Holman WX8 8 sprinkler irrigation controller - Inkbird PTH-9CW air quality monitor - KKMoon 7in1 air quality monitor - Kogan bidet toilet seat From 4930162783dc2cf2b92fa27b9a78c764343afd2a Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 4 Feb 2024 11:46:18 +0800 Subject: [PATCH 12/74] Add support for Ironzon fingerprint lock Issue #1554 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + .../devices/ironzon_fingerprint_lock.yaml | 114 ++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 custom_components/tuya_local/devices/ironzon_fingerprint_lock.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 6ecfcfe3b5..58f8f48358 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -479,3 +479,4 @@ Further device support has been made with the assistance of users. Please consid - [a-r-j-a-n](https://github.com/a-r-j-a-n) for contributing support for Poolex Arctic spa pool heatpumps. - [Geek-MD](https://github.com/Geek-MD) for contributing support for generic 2 outlet + 2 USB smartplugs. - [TwoWheelPro](https://github.com/TwoWheelPro) for contributing support for Holman WX8 irrigation controllers. +- [scrampker](https://github.com/scrampker) for assisting with support for Ironzon fingerprint locks. diff --git a/DEVICES.md b/DEVICES.md index 22d457129b..8f73e12e5d 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -635,6 +635,7 @@ port and password. - Diivoo WT05 dual water timer - HCT-611 water timer - HU06 smart lock +- Ironzon fingerprint lock - Orion DL021HA lock - PT216/PT19DB-2 temperature and humidity sensor - Smart Ape solar garden light diff --git a/custom_components/tuya_local/devices/ironzon_fingerprint_lock.yaml b/custom_components/tuya_local/devices/ironzon_fingerprint_lock.yaml new file mode 100644 index 0000000000..e73547547c --- /dev/null +++ b/custom_components/tuya_local/devices/ironzon_fingerprint_lock.yaml @@ -0,0 +1,114 @@ +name: Door lock +products: + - id: ludzroix + name: Ironzon PLD 190 +primary_entity: + entity: lock + dps: + - id: 12 + type: integer + name: unlock_fingerprint + optional: true + persist: false + - id: 13 + type: integer + name: unlock_password + optional: true + persist: false + - id: 14 + type: integer + name: unlock_dynamic_pwd + optional: true + persist: false + - id: 19 + type: integer + name: unlock_ble + optional: true + persist: false + - id: 55 + type: integer + name: unlock_temp_pwd + optional: true + persist: false + - id: 62 + type: integer + name: unlock_app + optional: true + persist: false + - id: 63 + type: integer + name: unlock_voice + optional: true + persist: true + - id: 64 + type: string + name: offline_password_timestamp +secondary_entities: + - entity: sensor + class: battery + category: diagnostic + dps: + - id: 8 + type: integer + name: sensor + unit: "%" + - entity: select + name: Beep volume + category: config + icon: "mdi:volume-high" + dps: + - id: 31 + type: string + name: option + mapping: + - dps_val: mute + value: Mute + - dps_val: low + value: Low + - dps_val: normal + value: Normal + - dps_val: high + value: High + - entity: binary_sensor + class: battery + category: diagnostic + dps: + - id: 21 + type: string + name: sensor + optional: true + persist: false + mapping: + - dps_val: low_battery + value: true + - value: false + - entity: binary_sensor + name: Too many attempts + class: problem + category: diagnostic + dps: + - id: 21 + type: string + name: sensor + optional: true + persist: false + mapping: + - dps_val: low_battery + value: false + - dps_val: null + value: false + - value: true + - id: 21 + type: string + name: details + - entity: binary_sensor + class: lock + dps: + - id: 47 + type: boolean + name: sensor + mapping: + - dps_val: true + value: false + - dps_val: false + value: true From 0bb592dbf4a01340ab07c2a952dbca08c9230992 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 4 Feb 2024 15:42:37 +0800 Subject: [PATCH 13/74] climate: allow min_temperature and max_temperature to be optional Fall back on the range specified by temperature dps when these are configured but not sent by the device. --- custom_components/tuya_local/climate.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/climate.py b/custom_components/tuya_local/climate.py index e731490282..debf4f4810 100644 --- a/custom_components/tuya_local/climate.py +++ b/custom_components/tuya_local/climate.py @@ -199,7 +199,9 @@ def min_temp(self): """Return the minimum supported target temperature.""" # if a separate min_temperature dps is specified, the device tells us. if self._mintemp_dps is not None: - return self._mintemp_dps.get_value(self._device) + min = self._mintemp_dps.get_value(self._device) + if min is not None: + return min if self._temperature_dps is None: if self._temp_low_dps is None: @@ -214,7 +216,9 @@ def max_temp(self): """Return the maximum supported target temperature.""" # if a separate max_temperature dps is specified, the device tells us. if self._maxtemp_dps is not None: - return self._maxtemp_dps.get_value(self._device) + max = self._maxtemp_dps.get_value(self._device) + if max is not None: + return max if self._temperature_dps is None: if self._temp_high_dps is None: From 20c53861b4b7c2b7a7194272362407707471423b Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 4 Feb 2024 16:17:48 +0800 Subject: [PATCH 14/74] Add support for Avatto ME81 thermostat Issue #1560 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + .../devices/avatto_me81_thermostat.yaml | 201 ++++++++++++++++++ 3 files changed, 203 insertions(+) create mode 100644 custom_components/tuya_local/devices/avatto_me81_thermostat.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 58f8f48358..35e846bedf 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -480,3 +480,4 @@ Further device support has been made with the assistance of users. Please consid - [Geek-MD](https://github.com/Geek-MD) for contributing support for generic 2 outlet + 2 USB smartplugs. - [TwoWheelPro](https://github.com/TwoWheelPro) for contributing support for Holman WX8 irrigation controllers. - [scrampker](https://github.com/scrampker) for assisting with support for Ironzon fingerprint locks. +- [sergeymatsay](https://github.com/sergeymatsay) for assisting with support for Avatto ME81 thermostats. diff --git a/DEVICES.md b/DEVICES.md index 8f73e12e5d..ae892637d4 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -122,6 +122,7 @@ ### Thermostats - Arlec PCTH01HA temperature/humidity smart switch +- Avatto ME81 thermostat - Avatto WT100 thermostat - Awow/Mi-heat TH213 thermostat (two variants) - Beca BAC-002 thermostat diff --git a/custom_components/tuya_local/devices/avatto_me81_thermostat.yaml b/custom_components/tuya_local/devices/avatto_me81_thermostat.yaml new file mode 100644 index 0000000000..908e05eb14 --- /dev/null +++ b/custom_components/tuya_local/devices/avatto_me81_thermostat.yaml @@ -0,0 +1,201 @@ +name: Thermostat +products: + - id: gogb05wrtredz3bs + name: Avatto ME81 +primary_entity: + entity: climate + dps: + - id: 1 + type: boolean + name: hvac_mode + mapping: + - dps_val: false + value: "off" + - dps_val: true + constraint: mode + conditions: + - dps_val: auto + value: auto + - dps_val: manual + value: heat + - id: 2 + type: string + name: mode + hidden: true + - id: 16 + type: integer + name: temperature + unit: C + range: + min: 5 + max: 90 + - id: 19 + type: integer + name: max_temperature + optional: true + - id: 26 + type: integer + name: min_temperature + optional: true + - id: 24 + type: integer + name: current_temperature + mapping: + - scale: 10 + - id: 36 + type: string + name: hvac_action + mapping: + - constraint: hvac_mode + conditions: + - dps_val: false + value: "off" + - mapping: + - dps_val: open + value: heating + - value: idle + - id: 38 + type: string + optional: true + name: week_program +secondary_entities: + - entity: switch + name: Anti-frost + icon: "mdi:snowflake" + category: config + dps: + - id: 10 + type: boolean + name: switch + optional: true + mapping: + - dps_val: null + value: false + hidden: true + - entity: number + name: Maximum temperature + class: temperature + category: config + icon: "mdi:thermometer-chevron-up" + dps: + - id: 19 + type: integer + name: value + optional: true + unit: C + range: + min: 30 + max: 90 + - entity: number + name: Minimum temperature + class: temperature + category: config + icon: "mdi:thermometer-chevron-down" + dps: + - id: 26 + type: integer + name: value + optional: true + unit: C + range: + min: 5 + max: 20 + - entity: number + name: Temperature calibration + category: config + icon: "mdi:thermometer-check" + dps: + - id: 27 + type: integer + optional: true + name: value + unit: ° + range: + min: -9 + max: 9 + - entity: button + name: Factory reset + category: config + dps: + - id: 39 + type: boolean + name: button + optional: true + - entity: lock + name: Child lock + icon: "mdi:hand-back-right-off" + category: config + dps: + - id: 40 + type: boolean + name: lock + optional: true + mapping: + - dps_val: null + value: false + hidden: true + - entity: select + name: Temperature sensor + icon: "mdi:home-thermometer" + category: config + dps: + - id: 43 + type: string + optional: true + name: option + mapping: + - dps_val: in + value: Internal + - dps_val: out + value: External + - dps_val: all + value: Both + - dps_val: null + value: Internal + hidden: true + - entity: binary_sensor + name: Fault + class: problem + category: diagnostic + dps: + - id: 45 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - id: 45 + type: bitfield + name: fault_code + - entity: number + name: Temperature hysteresis + category: config + icon: "mdi:thermometer-plus" + dps: + - id: 101 + type: integer + optional: true + name: value + unit: ° + range: + min: 1 + max: 5 + - entity: select + name: Program type + icon: "mdi:calendar-week" + category: config + dps: + - id: 102 + type: string + optional: true + name: option + mapping: + - dps_val: "00" + value: Disabled + - dps_val: "52" + value: Weekdays+Weekend + - dps_val: "61" + value: Six working days + - dps_val: "70" + value: Daily From 1e41851354b0319bb8cd2bcc8651dd34e02de56a Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 4 Feb 2024 19:25:25 +0800 Subject: [PATCH 15/74] Moes IR heatpump: clarify the supported model --- custom_components/tuya_local/devices/ir_moes_heatpump.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/ir_moes_heatpump.yaml b/custom_components/tuya_local/devices/ir_moes_heatpump.yaml index 0e1e28ab97..6060af3723 100644 --- a/custom_components/tuya_local/devices/ir_moes_heatpump.yaml +++ b/custom_components/tuya_local/devices/ir_moes_heatpump.yaml @@ -1,7 +1,7 @@ name: IR heatpump products: - id: hwktwkq - name: Moes IR remote heatpump + name: Moes SD16Pro primary_entity: entity: climate dps: From 64d076ce9110394e10cadfca1606217457fe16a8 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 4 Feb 2024 22:38:38 +0800 Subject: [PATCH 16/74] Nedis air quality: use new _parts class for VOC sensor. Since the VOC sensor of this device is using ppm, HA 2024.2 enforces strongly that you use the volatile_organic_compounds_parts class rather than the volatile_organic_compounds (which used to list ppm as an allowed unit, but no longer does). Issue #1601 --- custom_components/tuya_local/devices/nedis_airquality.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/nedis_airquality.yaml b/custom_components/tuya_local/devices/nedis_airquality.yaml index 7cf88e113d..d32f9fe81d 100644 --- a/custom_components/tuya_local/devices/nedis_airquality.yaml +++ b/custom_components/tuya_local/devices/nedis_airquality.yaml @@ -38,7 +38,7 @@ secondary_entities: mapping: - scale: 10 - entity: sensor - class: volatile_organic_compounds + class: volatile_organic_compounds_parts dps: - id: 21 type: integer From fe12170742ff872773572a528af6b908e7e0e8e1 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 4 Feb 2024 22:44:22 +0800 Subject: [PATCH 17/74] Nedis air quality: add name to VOC sensor for back compatibility. To avoid the entity id changing. Issue #1601 --- custom_components/tuya_local/devices/nedis_airquality.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/tuya_local/devices/nedis_airquality.yaml b/custom_components/tuya_local/devices/nedis_airquality.yaml index d32f9fe81d..9a4a1707b2 100644 --- a/custom_components/tuya_local/devices/nedis_airquality.yaml +++ b/custom_components/tuya_local/devices/nedis_airquality.yaml @@ -38,6 +38,7 @@ secondary_entities: mapping: - scale: 10 - entity: sensor + name: Volatile organic compounds class: volatile_organic_compounds_parts dps: - id: 21 From a1ba3efec0bd6e353604ee521055ecbf44e827da Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 5 Feb 2024 13:02:32 +0800 Subject: [PATCH 18/74] light: don't try to set brightness dp when switching to colour Condition for setting brightness dp included checking self.raw_color_mode, but if we were switching to ColorMode it would still apply brightness to the dp. In color mode, normally the rgbhsv includes brightness, so this leads to double brightness, or unexpected mode switching. Review triggered by discussion #1595 --- custom_components/tuya_local/light.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/tuya_local/light.py b/custom_components/tuya_local/light.py index ed3ad60954..b82018e43f 100644 --- a/custom_components/tuya_local/light.py +++ b/custom_components/tuya_local/light.py @@ -352,7 +352,10 @@ async def async_turn_on(self, **params): if ( ATTR_BRIGHTNESS in params - and self.raw_color_mode != ColorMode.HS + and ( + (self.raw_color_mode != ColorMode.HS and color_mode is None) + or (color_mode != ColorMode.HS and color_mode is not None) + ) and self._brightness_dps ): bright = params.get(ATTR_BRIGHTNESS) From 2dbd30b12b1adb05663e7a693440cb9a77f63f67 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 5 Feb 2024 16:55:22 +0800 Subject: [PATCH 19/74] device: output warning when a protocol error is recevied This is already done in the receive loop, but errors were not detected when doing a one time refresh (as in the Test connection when a device is added - when those messages are perhaps most valuable). Issue #1609 --- custom_components/tuya_local/device.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/custom_components/tuya_local/device.py b/custom_components/tuya_local/device.py index 097d117c2d..d09e63bfee 100644 --- a/custom_components/tuya_local/device.py +++ b/custom_components/tuya_local/device.py @@ -427,6 +427,13 @@ def _refresh_cached_state(self): self.name, log_json(new_state), ) + if "Err" in new_state: + _LOGGER.warning( + "%s protocol error %s: %s", + self.name, + new_state.get("Err"), + new_state.get("Error", "message not provided"), + ) _LOGGER.debug( "new state (incl pending): %s", log_json(self._get_cached_state()), From 2b74a761890d7d08a220a4fc069085b6424b18fe Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 5 Feb 2024 22:32:38 +0800 Subject: [PATCH 20/74] Add support for Tesla TAF series air conditioner Issue #1571 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + .../devices/tesla_airconditioner.yaml | 258 ++++++++++++++++++ 3 files changed, 260 insertions(+) create mode 100644 custom_components/tuya_local/devices/tesla_airconditioner.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 35e846bedf..c998019707 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -481,3 +481,4 @@ Further device support has been made with the assistance of users. Please consid - [TwoWheelPro](https://github.com/TwoWheelPro) for contributing support for Holman WX8 irrigation controllers. - [scrampker](https://github.com/scrampker) for assisting with support for Ironzon fingerprint locks. - [sergeymatsay](https://github.com/sergeymatsay) for assisting with support for Avatto ME81 thermostats. +- [hrenki](https://github.com/hrenki) for assisting with support for Tesla TAF series air conditioners. diff --git a/DEVICES.md b/DEVICES.md index ae892637d4..d987ffe0d2 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -82,6 +82,7 @@ - Star-Light air conditioner (also confirmed to work with Polar branded devices) - Suntec Wellness Coolfixx portable air conditioner - Tadiran Wind 65/3P +- Tesla TAF series air conditioner - TroniTechnik Hellnar Klimagerät - Trotec PAC-W 2600 SH heatpump - Vivax Cool ACP-12CH35REWI diff --git a/custom_components/tuya_local/devices/tesla_airconditioner.yaml b/custom_components/tuya_local/devices/tesla_airconditioner.yaml new file mode 100644 index 0000000000..0a3b8764d3 --- /dev/null +++ b/custom_components/tuya_local/devices/tesla_airconditioner.yaml @@ -0,0 +1,258 @@ +name: Air conditioner +products: + - id: wxqdp6ecfkd78zzz + name: Tesla TYAUX F/LM/J +primary_entity: + entity: climate + dps: + - id: 1 + type: boolean + name: hvac_mode + mapping: + - dps_val: false + value: "off" + - dps_val: true + constraint: mode + conditions: + - dps_val: cold + value: cool + - dps_val: hot + value: heat + - dps_val: wet + value: dry + - dps_val: wind + value: fan_only + - dps_val: auto + value: heat_cool + - id: 2 + type: integer + name: temperature + range: + min: 160 + max: 320 + mapping: + - scale: 10 + step: 5 + constraint: temperature_unit + conditions: + - dps_val: F + range: + min: 600 + max: 900 + - id: 3 + type: integer + name: current_temperature + mapping: + - scale: 10 + - id: 4 + name: mode + type: string + hidden: true + - id: 5 + type: string + name: fan_mode + mapping: + - dps_val: mute + value: "off" + - dps_val: low + value: low + - dps_val: mid + value: medium + - dps_val: high + value: high + - dps_val: auto + value: auto + - id: 8 + type: boolean + name: preset_mode + mapping: + - dps_val: true + value: eco + - dps_val: false + value: comfort + - id: 19 + type: string + name: temperature_unit + - id: 33 + type: boolean + name: swing_mode + mapping: + - dps_val: false + constraint: swing_vert + conditions: + - dps_val: false + value: "off" + - dps_val: true + value: vertical + - dps_val: true + constraint: swing_vert + conditions: + - dps_val: false + value: horizontal + - dps_val: true + value: both + - id: 105 + type: boolean + name: swing_vert + hidden: true + - id: 107 + type: bitfield + name: fault_code + - id: 108 + type: bitfield + name: model +secondary_entities: + - entity: switch + name: Emergency heat + category: config + dps: + - id: 12 + type: boolean + name: switch + - entity: light + name: Backlight + icon: "mdi:television-ambient-light" + category: config + dps: + - id: 13 + type: boolean + name: switch + - entity: lock + name: Child lock + icon: "mdi:hand-back-right-off" + category: config + dps: + - id: 14 + type: boolean + name: lock + - entity: select + name: Temperature unit + icon: "mdi:temperature-celsius" + category: config + dps: + - id: 19 + type: string + name: option + mapping: + - dps_val: C + value: Celsius + - dps_val: F + value: Fahrenheit + - entity: sensor + class: energy + category: diagnostic + dps: + - id: 28 + type: integer + name: sensor + unit: kWh + class: total_increasing + - entity: switch + name: Sleep + icon: "mdi:power-sleep" + category: config + dps: + - id: 102 + type: boolean + name: switch + - entity: switch + name: Clean + icon: "mdi:shimmer" + category: config + dps: + - id: 103 + type: boolean + name: switch + - entity: switch + name: Anti-mould + icon: "mdi:water-off" + category: config + dps: + - id: 104 + type: boolean + name: switch + - entity: switch + name: iHealth + icon: "mdi:creation" + category: config + dps: + - id: 106 + type: boolean + name: switch + - entity: binary_sensor + name: Fault + class: problem + category: diagnostic + dps: + - id: 107 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - entity: switch + name: "On timer" + icon: "mdi:timer" + category: config + dps: + - id: 109 + type: boolean + name: switch + - entity: switch + name: "Off timer" + icon: "mdi:timer" + category: config + dps: + - id: 110 + type: boolean + name: switch + - entity: number + name: Timer hours + category: config + icon: "mdi:timer" + dps: + - id: 111 + type: integer + name: value + unit: h + range: + min: 0 + max: 23 + - entity: number + name: Timer minutes + category: config + icon: "mdi:timer" + dps: + - id: 112 + type: integer + name: value + unit: min + range: + min: 0 + max: 59 + - entity: number + name: Power limit + icon: "mdi:meter-electric-outline" + category: diagnostic + dps: + - id: 103 + type: integer + name: value + optional: true + unit: "%" + range: + min: 30 + max: 100 + mapping: + - dps_val: null + value: 100 + hidden: true + - entity: switch + name: Limit power + icon: "mdi:meter-electric-outline" + category: config + dps: + - id: 104 + type: boolean + name: switch From c03dd61ac1c101a75d2f96bb176ea2c914d4b316 Mon Sep 17 00:00:00 2001 From: FSJHecker <99192504+FSJHecker@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:23:18 +0100 Subject: [PATCH 21/74] Added cleanair_604b_humidifier.yaml --- .../devices/cleanair_604b_humidifier.yaml | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml diff --git a/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml b/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml new file mode 100644 index 0000000000..67cb0c504e --- /dev/null +++ b/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml @@ -0,0 +1,165 @@ +name: Humidifier +products: + - id: cqoisddoci9i3yer + name: Clean Air Optima CA-604B Smart Top Filling +primary_entity: + entity: humidifier + dps: + - id: 1 + name: switch + type: boolean + mapping: + - dps_val: false + icon: mdi:air-humidifier-off + icon_priority: 2 + - id: 13 + name: humidity + type: integer + range: + min: 30 + max: 75 + step: 5 + - id: 14 + name: current_humidity + type: integer + - id: 23 + type: string + name: mode + mapping: + - dps_val: auto + value: auto + icon: mdi:refresh-auto + icon_priority: 3 + - dps_val: level1 + value: low + icon: mdi:speedometer-slow + icon_priority: 3 + - dps_val: level2 + value: middle + icon: mdi:speedometer-medium + icon_priority: 3 + - dps_val: level3 + value: high + icon: mdi:speedometer + icon_priority: 3 + - dps_val: sleep + value: sleep + icon: mdi:sleep + icon_priority: 3 +secondary_entities: + - entity: switch + name: Sound + dps: + - id: 8 + name: switch + type: boolean + mapping: + - dps_val: true + icon: mdi:volume-high + - dps_val: false + icon: mdi:volume-off + - entity: sensor + name: Current Temperature + class: temperature + dps: + - id: 10 + type: integer + name: sensor + unit: C + - entity: select + name: Timer + icon: mdi:timer + dps: + - id: 19 + name: option + type: string + mapping: + - dps_val: cancel + value: 'Off' + - dps_val: 1h + value: 1 hour + - dps_val: 2h + value: 2 hours + - dps_val: 3h + value: 3 hours + - dps_val: 4h + value: 4 hours + - dps_val: 5h + value: 5 hours + - dps_val: 6h + value: 6 hours + - dps_val: 7h + value: 7 hours + - dps_val: 8h + value: 8 hours + - dps_val: 9h + value: 9 hours + - dps_val: 10h + value: 10 hours + - dps_val: 11h + value: 11 hours + - dps_val: 12h + value: 12 hours + - id: 20 + name: remaining + type: integer + optional: true + - entity: binary_sensor + name: Watertank Empty + class: problem + category: diagnostic + dps: + - id: 22 + type: bitfield + name: sensor + mapping: + - dps_val: 1 + value: true + icon: mdi:water-remove + - value: false + icon: mdi:water + - entity: binary_sensor + name: Watertank Overfilled + class: problem + category: diagnostic + dps: + - id: 22 + type: bitfield + name: sensor + mapping: + - dps_val: 2 + value: true + icon: mdi:liquid-spot + - value: false + icon: mdi:water + - entity: switch + name: Ionizer + icon: mdi:creation + dps: + - id: 25 + type: boolean + name: switch + - entity: button + name: Filter reset + category: config + icon: mdi:air-filter + dps: + - id: 28 + type: boolean + name: button + - entity: sensor + name: Filter life + icon: mdi:air-filter + category: diagnostic + dps: + - id: 33 + type: integer + name: sensor + unit: "%" + - entity: switch + name: UV light + icon: mdi:sun-wireless + dps: + - id: 101 + type: boolean + name: switch From f1a4274627c00c98feaec3f750f667f165afbe0a Mon Sep 17 00:00:00 2001 From: FSJHecker <99192504+FSJHecker@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:08:12 +0100 Subject: [PATCH 22/74] Removed trailing spaces line 74 --- .../tuya_local/devices/cleanair_604b_humidifier.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml b/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml index 67cb0c504e..03b7d8d815 100644 --- a/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml +++ b/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml @@ -71,7 +71,7 @@ secondary_entities: icon: mdi:timer dps: - id: 19 - name: option + name: option type: string mapping: - dps_val: cancel From bf6e05691635982050fef73eecfd985e98194a42 Mon Sep 17 00:00:00 2001 From: FSJHecker <99192504+FSJHecker@users.noreply.github.com> Date: Mon, 5 Feb 2024 15:41:36 +0100 Subject: [PATCH 23/74] Review comments incorporated Changes made: - Name shortened - Removed Removed dynamic icons and added static icons where necessary - Removed name from temperature sensor - Converted time remaining attribute to a sensor - Entity names adapted to HA naming convention --- .../devices/cleanair_604b_humidifier.yaml | 34 +++++++------------ 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml b/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml index 03b7d8d815..b0b8333c22 100644 --- a/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml +++ b/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml @@ -1,7 +1,7 @@ name: Humidifier products: - id: cqoisddoci9i3yer - name: Clean Air Optima CA-604B Smart Top Filling + name: Clean Air 604B Smart primary_entity: entity: humidifier dps: @@ -10,7 +10,6 @@ primary_entity: type: boolean mapping: - dps_val: false - icon: mdi:air-humidifier-off icon_priority: 2 - id: 13 name: humidity @@ -18,7 +17,6 @@ primary_entity: range: min: 30 max: 75 - step: 5 - id: 14 name: current_humidity type: integer @@ -28,38 +26,28 @@ primary_entity: mapping: - dps_val: auto value: auto - icon: mdi:refresh-auto icon_priority: 3 - dps_val: level1 value: low - icon: mdi:speedometer-slow icon_priority: 3 - dps_val: level2 value: middle - icon: mdi:speedometer-medium icon_priority: 3 - dps_val: level3 value: high - icon: mdi:speedometer icon_priority: 3 - dps_val: sleep value: sleep - icon: mdi:sleep icon_priority: 3 secondary_entities: - entity: switch name: Sound + icon: mdi:volume-high dps: - id: 8 name: switch type: boolean - mapping: - - dps_val: true - icon: mdi:volume-high - - dps_val: false - icon: mdi:volume-off - entity: sensor - name: Current Temperature class: temperature dps: - id: 10 @@ -100,12 +88,17 @@ secondary_entities: value: 11 hours - dps_val: 12h value: 12 hours + - entity: sensor + name: Time remaining + class: duration + dps: - id: 20 - name: remaining + name: sensor type: integer - optional: true + unit: min - entity: binary_sensor - name: Watertank Empty + name: Watertank empty + icon: mdi:water-remove class: problem category: diagnostic dps: @@ -115,11 +108,10 @@ secondary_entities: mapping: - dps_val: 1 value: true - icon: mdi:water-remove - value: false - icon: mdi:water - entity: binary_sensor - name: Watertank Overfilled + name: Watertank overflow + icon: mdi:liquid-spot class: problem category: diagnostic dps: @@ -129,9 +121,7 @@ secondary_entities: mapping: - dps_val: 2 value: true - icon: mdi:liquid-spot - value: false - icon: mdi:water - entity: switch name: Ionizer icon: mdi:creation From e1ecb0795966ba3d4e543776ab43e1a843fb249e Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 6 Feb 2024 13:26:08 +0800 Subject: [PATCH 24/74] CleanAir 604B: minor cleanup before merge Remove left over icon_priority tags without icons. rename Watertank to Water tank. --- .../tuya_local/devices/cleanair_604b_humidifier.yaml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml b/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml index b0b8333c22..2edc9ef6a9 100644 --- a/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml +++ b/custom_components/tuya_local/devices/cleanair_604b_humidifier.yaml @@ -8,9 +8,6 @@ primary_entity: - id: 1 name: switch type: boolean - mapping: - - dps_val: false - icon_priority: 2 - id: 13 name: humidity type: integer @@ -26,19 +23,14 @@ primary_entity: mapping: - dps_val: auto value: auto - icon_priority: 3 - dps_val: level1 value: low - icon_priority: 3 - dps_val: level2 value: middle - icon_priority: 3 - dps_val: level3 value: high - icon_priority: 3 - dps_val: sleep value: sleep - icon_priority: 3 secondary_entities: - entity: switch name: Sound @@ -97,7 +89,7 @@ secondary_entities: type: integer unit: min - entity: binary_sensor - name: Watertank empty + name: Water tank empty icon: mdi:water-remove class: problem category: diagnostic @@ -110,7 +102,7 @@ secondary_entities: value: true - value: false - entity: binary_sensor - name: Watertank overflow + name: Water tank overflow icon: mdi:liquid-spot class: problem category: diagnostic From 854ba1fa5ce14d34563857e0884e1abd8ef855f3 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 8 Feb 2024 08:41:26 +0800 Subject: [PATCH 25/74] Summary: Hombli thermostat: Add valve opening sensor Added as both numeric sensor (% opened) and hvac_action for climate entity. Enhancment based on comment to PR #1424 Update docs for PR #1612 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + .../hombli_thermostatic_radiator_valve.yaml | 21 +++++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index c998019707..e0d6477ad3 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -482,3 +482,4 @@ Further device support has been made with the assistance of users. Please consid - [scrampker](https://github.com/scrampker) for assisting with support for Ironzon fingerprint locks. - [sergeymatsay](https://github.com/sergeymatsay) for assisting with support for Avatto ME81 thermostats. - [hrenki](https://github.com/hrenki) for assisting with support for Tesla TAF series air conditioners. +- [FSJHecker](https://github.com/FSJHecker) for contributing support for CleanAir 604B humidifiers. diff --git a/DEVICES.md b/DEVICES.md index d987ffe0d2..6baadb451e 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -175,6 +175,7 @@ - Casafan ECO Neo III ceiling fan with light - Cecotec ceiling fan with light - Chanfok ceiling fan with cool/warm white dimmable light +- CleanAir 604B humidifier - Deta fan controller - Djive ARC humidifying fan - Duux Whisper Flex pedestal fan diff --git a/custom_components/tuya_local/devices/hombli_thermostatic_radiator_valve.yaml b/custom_components/tuya_local/devices/hombli_thermostatic_radiator_valve.yaml index a53bf28489..ba41a92d71 100644 --- a/custom_components/tuya_local/devices/hombli_thermostatic_radiator_valve.yaml +++ b/custom_components/tuya_local/devices/hombli_thermostatic_radiator_valve.yaml @@ -35,6 +35,19 @@ primary_entity: value: "away" - dps_val: false value: "home" + - id: 104 + type: integer + name: hvac_action + mapping: + - constraint: hvac_mode + conditions: + - dps_val: false + value: "off" + - dps_val: true + mapping: + - dps_val: 0 + value: idle + - value: heating secondary_entities: - entity: switch name: Window check @@ -117,3 +130,11 @@ secondary_entities: - id: 130 type: boolean name: switch + - entity: sensor + name: Valve + category: diagnostic + dps: + - id: 104 + type: integer + name: sensor + unit: "%" From 0f646bc6c7ce7256e321de30642dfbaac5337505 Mon Sep 17 00:00:00 2001 From: Philippe De Swert Date: Fri, 26 Jan 2024 00:32:25 +0200 Subject: [PATCH 26/74] Add support for Goodcell 3-phase 22kW EV charger * Add support for Goodcell and similar EV chargers * Fix icon name for type 2 plug for Feyree charger Signed-off-by: Philippe De Swert --- .../tuya_local/devices/feyree_ev_charger.yaml | 2 +- .../devices/goodcell_ev_charger.yaml | 275 ++++++++++++++++++ 2 files changed, 276 insertions(+), 1 deletion(-) create mode 100644 custom_components/tuya_local/devices/goodcell_ev_charger.yaml diff --git a/custom_components/tuya_local/devices/feyree_ev_charger.yaml b/custom_components/tuya_local/devices/feyree_ev_charger.yaml index 95c81d7b2a..edec43d904 100644 --- a/custom_components/tuya_local/devices/feyree_ev_charger.yaml +++ b/custom_components/tuya_local/devices/feyree_ev_charger.yaml @@ -89,7 +89,7 @@ secondary_entities: - entity: number name: Set charge current category: config - icon: "mdi:ev-plug-type-2" + icon: "mdi:ev-plug-type2" dps: - id: 102 type: integer diff --git a/custom_components/tuya_local/devices/goodcell_ev_charger.yaml b/custom_components/tuya_local/devices/goodcell_ev_charger.yaml new file mode 100644 index 0000000000..c807bd9c40 --- /dev/null +++ b/custom_components/tuya_local/devices/goodcell_ev_charger.yaml @@ -0,0 +1,275 @@ +name: EV charger +products: + - id: j6bzjwhiv2cljjcy + name: Goodcell 32A 85-264V 3 phase EV charger +primary_entity: + entity: sensor + class: enum + name: Status + icon: "mdi:ev-station" + dps: + - id: 101 + type: string + name: sensor + mapping: + - dps_val: no_connet + value: Disconnected + - dps_val: connect + value: Connected + - dps_val: charing + value: Charging + - dps_val: wait_rfid + value: Waiting for authorization + - dps_val: finish + value: Charged + - dps_val: wait_charing + value: Delaying charge + - dps_val: error + value: Error + - id: 3 + type: string + optional: true + name: charger_status + mapping: + - dps_val: charger_free + value: Standby + - dps_val: charger_insert + value: Cable connected + - dps_val: charger_free_fault + value: Charger fault + - dps_val: charger_wait + value: Charger ready + - dps_val: charger_charging + value: Charging + - dps_val: charger_pause + value: Charging paused + - dps_val: charger_end + value: Charging ended + - dps_val: charger_fault + value: Charger fault + - id: 10 + type: bitfield + name: fault_code + - id: 11 + type: string + optional: true + name: alarm_set_1 + - id: 12 + type: string + optional: true + name: alarm_set_2 + - id: 14 + type: string + optional: true + name: mode + mapping: + - dps_val: charge_now + - dps_val: charge_pct + - dps_val: charge_energy + - dps_val: charge_schedule + - id: 15 + type: integer + optional: true + name: balance_energy + unit: kWh + - id: 18 + type: boolean + optional: true + name: switch + - id: 23 + type: string + optional: true + name: system_version + - id: 25 + type: integer + optional: true + name: charge_energy_once + unit: kWh + - id: 27 + type: string + optional: true + name: online_state +secondary_entities: + - entity: button + name: Clear energy + class: restart + category: config + hidden: true + dps: + - id: 16 + type: boolean + name: button + optional: true + - entity: number + name: Set charge current + category: config + icon: "mdi:ev-plug-type2" + dps: + - id: 115 + type: integer + name: value + unit: A + range: + min: 6 + max: 32 + mapping: + - constraint: max_current + conditions: + - dps_val: Max16A + value_redirect: value_alt + range: + min: 6 + max: 16 + - id: 114 + type: integer + name: value_alt + unit: A + range: + min: 6 + max: 16 + - id: 113 + type: string + name: max_current + mapping: + - dps_val: Max16A + value: Max16A + - dps_val: Max32A + value: Max32A + - entity: number + name: Charge delay + category: config + icon: "mdi:car-clock" + dps: + - id: 118 + type: integer + name: value + unit: h + range: + min: 0 + max: 15 + - entity: sensor + class: energy + dps: + - id: 112 + type: integer + name: sensor + unit: kWh + class: measurement + mapping: + - scale: 10 + - entity: sensor + name: Voltage L1 + class: voltage + category: diagnostic + dps: + - id: 102 + type: integer + name: sensor + unit: V + class: measurement + mapping: + - scale: 10 + - entity: sensor + name: Voltage L2 + class: voltage + category: diagnostic + dps: + - id: 103 + type: integer + name: sensor + unit: V + class: measurement + - entity: sensor + name: Voltage L3 + class: voltage + category: diagnostic + dps: + - id: 104 + type: integer + name: sensor + unit: V + class: measurement + - entity: sensor + name: Current L1 + class: current + category: diagnostic + dps: + - id: 105 + type: integer + name: sensor + unit: A + class: measurement + mapping: + - scale: 10 + - entity: sensor + name: Current L2 + class: current + category: diagnostic + dps: + - id: 106 + type: integer + name: sensor + unit: A + class: measurement + mapping: + - scale: 10 + - entity: sensor + name: Current L3 + class: current + category: diagnostic + dps: + - id: 107 + type: integer + name: sensor + unit: A + class: measurement + mapping: + - scale: 10 + - entity: sensor + class: power + dps: + - id: 109 + type: integer + name: sensor + unit: kW + class: measurement + mapping: + - scale: 10 + - entity: sensor + class: temperature + category: diagnostic + dps: + - id: 110 + type: integer + name: sensor + unit: C + class: measurement + mapping: + - scale: 10 + - entity: number + name: Charging duration + category: config + icon: "mdi:car-clock" + dps: + - id: 119 + type: integer + name: value + unit: h + range: + min: 0 + max: 15 + - entity: select + name: Toggle charging + icon: "mdi:ev-plug-type2" + category: config + dps: + - id: 124 + type: string + name: option + mapping: + - dps_val: "OpenCharging" + value: Start charging + - dps_val: "CloseCharging" + value: Stop charging + - dps_val: "WaitOperation" + value: Waiting for command From e4552bfb40ea05dd0f1a6b7bd7e7c634d1bdcdfe Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Sat, 6 Jan 2024 11:18:05 +1100 Subject: [PATCH 27/74] Add files via upload --- .../kogan_kawfpac12ya_airconditioner.yaml | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 custom_components/tuya_local/devices/kogan_kawfpac12ya_airconditioner.yaml diff --git a/custom_components/tuya_local/devices/kogan_kawfpac12ya_airconditioner.yaml b/custom_components/tuya_local/devices/kogan_kawfpac12ya_airconditioner.yaml new file mode 100644 index 0000000000..ef56be8475 --- /dev/null +++ b/custom_components/tuya_local/devices/kogan_kawfpac12ya_airconditioner.yaml @@ -0,0 +1,115 @@ +name: Kogan Y12 Airconditioner +products: + - id: kawfpac12ya + name: Kogan Smart PAC_Y12 +primary_entity: + entity: climate + dps: + - id: 1 + name: hvac_mode + type: boolean + mapping: + - dps_val: false + value: "off" + icon: "mdi:hvac-off" + - dps_val: true + constraint: mode + conditions: + - dps_val: COOL + icon: "mdi:snowflake" + value: cool + - dps_val: FAN + icon: "mdi:fan" + value: fan_only + - dps_val: DRY + icon: "mdi:water" + value: dry + # - dps_val: Heat + # icon: "mdi:heat-wave" + # value: heat + - id: 2 + name: temperature + type: integer + mapping: + - constraint: temperature_unit + conditions: + - dps_val: "C" + range: + min: 16 + max: 32 + - dps_val: "F" + range: + min: 60 + max: 90 + - id: 3 + name: current_temperature + type: integer + - id: 4 + name: mode + type: string + hidden: true + + + # conditions: + # - dps_val: COOL + # icon: "mdi:snowflake" + # value: cold + # - dps_val: FAN + # icon: "mdi:fan" + # value: wind + # - dps_val: DRY + # icon: "mdi:water" + # value: wet + # - dps_val: HEAT + # icon: "mdi:fire" + # value: hot + + + + - id: 5 + name: fan_mode + type: integer + mapping: + - dps_val: 1 + value: low + - dps_val: 2 + value: medium + - dps_val: 3 + value: high + - id: 19 + name: temperature_unit + type: string + - id: 101 + type: boolean + name: preset_mode + mapping: + - dps_val: true + value: sleep + - dps_val: false + value: comfort + - id: 102 + name: unknown_102 + type: boolean + - id: 103 + name: timer + type: integer + - id: 104 + name: swing_mode + type: boolean + mapping: + - dps_val: true + value: "vertical" + - dps_val: false + value: "off" + - id: 105 + name: countdown + type: integer + - id: 106 + name: unknown_106 + type: integer + - id: 109 + name: unknown_109 + type: boolean + - id: 110 + name: unknown_110 + type: integer \ No newline at end of file From 5a2718608b06823b6938e3656bd1a1cc3af0a796 Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Sat, 6 Jan 2024 11:21:25 +1100 Subject: [PATCH 28/74] Add files via upload --- .../kogan_kawfpac16pya_airconditioner.yaml | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 custom_components/tuya_local/devices/kogan_kawfpac16pya_airconditioner.yaml diff --git a/custom_components/tuya_local/devices/kogan_kawfpac16pya_airconditioner.yaml b/custom_components/tuya_local/devices/kogan_kawfpac16pya_airconditioner.yaml new file mode 100644 index 0000000000..4a50120e7b --- /dev/null +++ b/custom_components/tuya_local/devices/kogan_kawfpac16pya_airconditioner.yaml @@ -0,0 +1,115 @@ +name: Kogan PY16 Airconditioner +products: + - id: kawfpac16pya + name: Kogan Smart PAC_PY16 +primary_entity: + entity: climate + dps: + - id: 1 + name: hvac_mode + type: boolean + mapping: + - dps_val: false + value: "off" + icon: "mdi:hvac-off" + - dps_val: true + constraint: mode + conditions: + - dps_val: COOL + icon: "mdi:snowflake" + value: cool + - dps_val: FAN + icon: "mdi:fan" + value: fan_only + - dps_val: DRY + icon: "mdi:water" + value: dry + - dps_val: HEAT + icon: "mdi:heat-wave" + value: heat + - id: 2 + name: temperature + type: integer + mapping: + - constraint: temperature_unit + conditions: + - dps_val: "C" + range: + min: 16 + max: 32 + - dps_val: "F" + range: + min: 60 + max: 90 + - id: 3 + name: current_temperature + type: integer + - id: 4 + name: mode + type: string + hidden: true + + + # conditions: + # - dps_val: COOL + # icon: "mdi:snowflake" + # value: cool + # - dps_val: FAN + # icon: "mdi:fan" + # value: fan + # - dps_val: DRY + # icon: "mdi:water" + # value: dry + # - dps_val: HEAT + # icon: "mdi:fire" + # value: heat + + + - id: 5 + name: fan_mode + type: integer + mapping: + - dps_val: 1 + value: low + - dps_val: 2 + value: medium + - dps_val: 3 + value: high + - id: 19 + name: temperature_unit + type: string + - id: 101 + type: boolean + name: preset_mode + mapping: + - dps_val: true + value: sleep + - dps_val: false + value: comfort + - id: 102 + name: unknown_102 + type: boolean + - id: 103 + name: timer + type: integer + - id: 104 + name: swing_mode + type: boolean + mapping: + - dps_val: true + value: "vertical" + - dps_val: false + value: "off" +secondary_entities: + - id: 105 + name: countdown + type: integer + - id: 106 + name: fault_code + type: bitfield + - id: 109 + name: unknown_109 + type: boolean + - id: 110 + name: unknown_110 + type: integer \ No newline at end of file From ac01aa752204b66b3e2da1fa3e57af23909c160c Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Sat, 6 Jan 2024 11:56:59 +1100 Subject: [PATCH 29/74] Add files via upload --- .../tuya_local/devices/arlec_6speed_fan.yaml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/custom_components/tuya_local/devices/arlec_6speed_fan.yaml b/custom_components/tuya_local/devices/arlec_6speed_fan.yaml index f6656cd9af..bf37051fbc 100644 --- a/custom_components/tuya_local/devices/arlec_6speed_fan.yaml +++ b/custom_components/tuya_local/devices/arlec_6speed_fan.yaml @@ -18,18 +18,18 @@ primary_entity: value: nature - dps_val: sleep value: sleep - - dps_val: fresh - value: fresh - - dps_val: smart - value: smart - - dps_val: strong - value: strong - - dps_val: closed - value: "off" + # - dps_val: fresh + # value: fresh + # - dps_val: smart + # value: smart + # - dps_val: strong + # value: strong + # - dps_val: closed + # value: "off" - dps_val: ordinary value: normal - - dps_val: null - value: "off" + # - dps_val: null + # value: "off" - id: 3 name: speed type: string From 214e806e16f4018d2367ca57e3aed7b9f66dfcfb Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:09:46 +1100 Subject: [PATCH 30/74] Add files via upload --- .../kogan_kawfpac16pya_airconditioner.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/custom_components/tuya_local/devices/kogan_kawfpac16pya_airconditioner.yaml b/custom_components/tuya_local/devices/kogan_kawfpac16pya_airconditioner.yaml index 4a50120e7b..3dfcc23663 100644 --- a/custom_components/tuya_local/devices/kogan_kawfpac16pya_airconditioner.yaml +++ b/custom_components/tuya_local/devices/kogan_kawfpac16pya_airconditioner.yaml @@ -24,7 +24,7 @@ primary_entity: - dps_val: DRY icon: "mdi:water" value: dry - - dps_val: HEAT + - dps_val: Heat icon: "mdi:heat-wave" value: heat - id: 2 @@ -53,16 +53,17 @@ primary_entity: # conditions: # - dps_val: COOL # icon: "mdi:snowflake" - # value: cool + # value: cold # - dps_val: FAN # icon: "mdi:fan" - # value: fan + # value: wind # - dps_val: DRY # icon: "mdi:water" - # value: dry + # value: wet # - dps_val: HEAT # icon: "mdi:fire" - # value: heat + # value: hot + - id: 5 @@ -100,13 +101,12 @@ primary_entity: value: "vertical" - dps_val: false value: "off" -secondary_entities: - id: 105 name: countdown type: integer - id: 106 - name: fault_code - type: bitfield + name: unknown_106 + type: integer - id: 109 name: unknown_109 type: boolean From 8ebdb59c2c33dfdb334d96d71af687f836064044 Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:35:05 +1100 Subject: [PATCH 31/74] Add files via upload --- .../devices/mirabella_power_strip.yaml | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 custom_components/tuya_local/devices/mirabella_power_strip.yaml diff --git a/custom_components/tuya_local/devices/mirabella_power_strip.yaml b/custom_components/tuya_local/devices/mirabella_power_strip.yaml new file mode 100644 index 0000000000..bc7f170265 --- /dev/null +++ b/custom_components/tuya_local/devices/mirabella_power_strip.yaml @@ -0,0 +1,142 @@ +name: Genio Smart Power Board 2Gnd +products: + - id: 5dvqb3eeuhhnjnlr + name: Genio Smart Power Board 2Gnd +primary_entity: + entity: switch + name: Outlet 1 + class: outlet + dps: + - id: 1 + type: boolean + name: switch +secondary_entities: + - entity: switch + name: Outlet 2 + class: outlet + dps: + - id: 2 + type: boolean + name: switch + - entity: switch + name: Outlet 3 + class: outlet + dps: + - id: 3 + type: boolean + name: switch + - entity: switch + name: Outlet 4 + class: outlet + dps: + - id: 4 + type: boolean + name: switch + - entity: switch + name: Outlet 5 + class: outlet + dps: + - id: 5 + type: boolean + name: switch + - entity: number + category: config + name: Timer switch 1 + icon: "mdi:timer" + dps: + - id: 9 + name: value + type: integer + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: number + category: config + name: Timer switch 2 + icon: "mdi:timer" + dps: + - id: 10 + name: value + type: integer + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: number + category: config + name: Timer switch 3 + icon: "mdi:timer" + dps: + - id: 11 + name: value + type: integer + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: number + category: config + name: Timer switch 4 + icon: "mdi:timer" + dps: + - id: 12 + name: value + type: integer + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: number + category: config + name: Timer switch 5 + icon: "mdi:timer" + dps: + - id: 13 + name: value + type: integer + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: select + category: config + name: Restore power state + dps: + - id: 38 + name: option + type: string + mapping: + - dps_val: memory + value: Remember Last Status + - dps_val: "on" + value: "On" + - dps_val: "off" + value: "Off" + - entity: lock + category: config + name: Child lock + dps: + - id: 41 + name: lock + type: boolean + mapping: + - dps_val: true + icon: "mdi:lock" + - dps_val: false + icon: "mdi:lock-open" From 76940da487c74b758c0955aec1e97f6f88ef4750 Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:42:39 +1100 Subject: [PATCH 32/74] Add files via upload --- .../kogan_kablfan1csa_purifier_fan.yaml | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml diff --git a/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml b/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml new file mode 100644 index 0000000000..e051b6a5d5 --- /dev/null +++ b/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml @@ -0,0 +1,103 @@ +name: Kogan Smarterhome Bladeless Purifier Fan +products: + - id: bmxs6cx65djk4zrr +primary_entity: + entity: fan + dps: + - id: 1 + type: boolean + name: switch + - id: 2 + type: string + name: speed + mapping: + - dps_val: level_1 + value: 11 + step: 11 + - dps_val: level_2 + value: 22 + step: 11 + - dps_val: level_3 + value: 33 + step: 11 + - dps_val: level_4 + value: 44 + step: 11 + - dps_val: level_5 + value: 55 + step: 11 + - dps_val: level_6 + value: 66 + step: 11 + - dps_val: level_7 + value: 77 + step: 11 + - dps_val: level_8 + value: 88 + step: 11 + - dps_val: level_9 + value: 100 + step: 12 + - id: 4 + name: preset_mode + type: string + optional: true + mapping: + - dps_val: close + value: normal + - dps_val: fresh + value: natural + - dps_val: sleep + value: sleep + - dps_val: heavy + value: Boost + - id: 8 + type: boolean + name: oscillate + - id: 13 + type: bitfield + name: fault_code +secondary_entities: + - entity: boolean + name: Sound + icon: "mdi:volume-high" + category: config + dps: + - id: 102 + type: boolean + name: switch + - entity: binary_sensor + name: Fault + class: problem + category: diagnostic + dps: + - id: 8 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - entity: select + name: Timer + icon: "mdi:timer" + category: config + dps: + - id: 6 + type: string + name: option + mapping: + - dps_val: "0" + value: "Off" + - dps_val: "1" + value: "1 hour" + - dps_val: "2" + value: "2 hours" + - dps_val: "3" + value: "3 hours" + - dps_val: "4" + value: "4 hours" + - dps_val: "5" + value: "5 hours" + - dps_val: "6" + value: "6 hours" \ No newline at end of file From 77e3a2e4ad3a96971f93ca413f194d186e3ecb4e Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:58:17 +1100 Subject: [PATCH 33/74] Add files via upload --- .../tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml b/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml index e051b6a5d5..b99cc80269 100644 --- a/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml +++ b/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml @@ -1,6 +1,7 @@ name: Kogan Smarterhome Bladeless Purifier Fan products: - id: bmxs6cx65djk4zrr + name: Kogan Smarterhome Bladeless Purifier Fan primary_entity: entity: fan dps: From 1841a91659b28021a8bd328ff04333ccbf2311e8 Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Sat, 6 Jan 2024 13:17:49 +1100 Subject: [PATCH 34/74] Add files via upload --- .../tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml b/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml index b99cc80269..18150ae3ac 100644 --- a/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml +++ b/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml @@ -72,7 +72,7 @@ secondary_entities: class: problem category: diagnostic dps: - - id: 8 + - id: 11 type: bitfield name: sensor mapping: From 0e128ba8ed7be202d0fa812e336377f6299c2089 Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Sat, 6 Jan 2024 16:26:37 +1100 Subject: [PATCH 35/74] Delete custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml --- .../kogan_kablfan1csa_purifier_fan.yaml | 104 ------------------ 1 file changed, 104 deletions(-) delete mode 100644 custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml diff --git a/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml b/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml deleted file mode 100644 index 18150ae3ac..0000000000 --- a/custom_components/tuya_local/devices/kogan_kablfan1csa_purifier_fan.yaml +++ /dev/null @@ -1,104 +0,0 @@ -name: Kogan Smarterhome Bladeless Purifier Fan -products: - - id: bmxs6cx65djk4zrr - name: Kogan Smarterhome Bladeless Purifier Fan -primary_entity: - entity: fan - dps: - - id: 1 - type: boolean - name: switch - - id: 2 - type: string - name: speed - mapping: - - dps_val: level_1 - value: 11 - step: 11 - - dps_val: level_2 - value: 22 - step: 11 - - dps_val: level_3 - value: 33 - step: 11 - - dps_val: level_4 - value: 44 - step: 11 - - dps_val: level_5 - value: 55 - step: 11 - - dps_val: level_6 - value: 66 - step: 11 - - dps_val: level_7 - value: 77 - step: 11 - - dps_val: level_8 - value: 88 - step: 11 - - dps_val: level_9 - value: 100 - step: 12 - - id: 4 - name: preset_mode - type: string - optional: true - mapping: - - dps_val: close - value: normal - - dps_val: fresh - value: natural - - dps_val: sleep - value: sleep - - dps_val: heavy - value: Boost - - id: 8 - type: boolean - name: oscillate - - id: 13 - type: bitfield - name: fault_code -secondary_entities: - - entity: boolean - name: Sound - icon: "mdi:volume-high" - category: config - dps: - - id: 102 - type: boolean - name: switch - - entity: binary_sensor - name: Fault - class: problem - category: diagnostic - dps: - - id: 11 - type: bitfield - name: sensor - mapping: - - dps_val: 0 - value: false - - value: true - - entity: select - name: Timer - icon: "mdi:timer" - category: config - dps: - - id: 6 - type: string - name: option - mapping: - - dps_val: "0" - value: "Off" - - dps_val: "1" - value: "1 hour" - - dps_val: "2" - value: "2 hours" - - dps_val: "3" - value: "3 hours" - - dps_val: "4" - value: "4 hours" - - dps_val: "5" - value: "5 hours" - - dps_val: "6" - value: "6 hours" \ No newline at end of file From 826223862e079c9d7d0ec40878c2e6bff3ff780c Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Sat, 6 Jan 2024 16:27:18 +1100 Subject: [PATCH 36/74] Add files via upload --- .../devices/kogan_kablfan1csa_fan.yaml | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 custom_components/tuya_local/devices/kogan_kablfan1csa_fan.yaml diff --git a/custom_components/tuya_local/devices/kogan_kablfan1csa_fan.yaml b/custom_components/tuya_local/devices/kogan_kablfan1csa_fan.yaml new file mode 100644 index 0000000000..986934f1d7 --- /dev/null +++ b/custom_components/tuya_local/devices/kogan_kablfan1csa_fan.yaml @@ -0,0 +1,109 @@ +name: Kogan Smarterhome Bladeless Purifier Fan +products: + - id: kablfan1csa +primary_entity: + entity: fan + dps: + - id: 1 + type: boolean + name: switch + - id: 2 + type: string + name: speed + mapping: + - dps_val: "1" + value: 11 + step: 11 + - dps_val: "2" + value: 22 + step: 11 + - dps_val: "3" + value: 33 + step: 11 + - dps_val: "4" + value: 44 + step: 11 + - dps_val: "5" + value: 55 + step: 11 + - dps_val: "6" + value: 66 + step: 11 + - dps_val: "7" + value: 77 + step: 11 + - dps_val: "8" + value: 88 + step: 11 + - dps_val: "9" + value: 100 + step: 12 + - id: 4 + name: preset_mode + type: string + mapping: + - dps_val: close + value: "off" + - dps_val: sleep + value: Sleep + - dps_val: fresh + value: Nature + - dps_val: heavy + value: Boost + - id: 8 + type: boolean + name: oscillate + - id: 13 + name: fault_code + type: bitfield +secondary_entities: + - entity: switch + name: Sound + icon: "mdi:volume-high" + category: config + dps: + - id: 102 + type: boolean + name: switch + - entity: binary_sensor + name: Fault + class: problem + category: diagnostic + dps: + - id: 13 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - entity: select + name: Timer + icon: "mdi:timer" + category: config + dps: + - id: 11 + type: string + name: option + mapping: + - dps_val: "0" + value: "Off" + - dps_val: "1" + value: "1 hour" + - dps_val: "2" + value: "2 hours" + - dps_val: "3" + value: "3 hours" + - dps_val: "4" + value: "4 hours" + - dps_val: "5" + value: "5 hours" + - dps_val: "6" + value: "6 hours" + - dps_val: "7" + value: "7 hours" + - dps_val: "8" + value: "8 hours" + + + From a1898e1743a9200c23c23da053b36a341d17486c Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Sat, 6 Jan 2024 16:41:14 +1100 Subject: [PATCH 37/74] Add files via upload --- .../devices/kogan_kablfan1csa_fan.yaml | 2 +- .../devices/kogan_kasbkstfansa_fan.yaml | 110 ++++++++++++++++++ 2 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml diff --git a/custom_components/tuya_local/devices/kogan_kablfan1csa_fan.yaml b/custom_components/tuya_local/devices/kogan_kablfan1csa_fan.yaml index 986934f1d7..b5ad9ad66f 100644 --- a/custom_components/tuya_local/devices/kogan_kablfan1csa_fan.yaml +++ b/custom_components/tuya_local/devices/kogan_kablfan1csa_fan.yaml @@ -38,7 +38,7 @@ primary_entity: - dps_val: "9" value: 100 step: 12 - - id: 4 + - id: 3 name: preset_mode type: string mapping: diff --git a/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml b/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml new file mode 100644 index 0000000000..faa0e39778 --- /dev/null +++ b/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml @@ -0,0 +1,110 @@ +name: Kogan Smart Bladeless Turbo Fan (Silver) +products: + - id: kasblstfansa +primary_entity: + entity: fan + dps: + - id: 1 + type: boolean + name: switch + - id: 2 + type: string + name: speed + mapping: + - dps_val: "1" + value: 11 + step: 11 + - dps_val: "2" + value: 22 + step: 11 + - dps_val: "3" + value: 33 + step: 11 + - dps_val: "4" + value: 44 + step: 11 + - dps_val: "5" + value: 55 + step: 11 + - dps_val: "6" + value: 66 + step: 11 + - dps_val: "7" + value: 77 + step: 11 + - dps_val: "8" + value: 88 + step: 11 + - dps_val: "9" + value: 100 + step: 12 + - id: 3 + name: preset_mode + type: string + mapping: + - dps_val: close + value: "off" + - dps_val: sleep + value: Sleep + - dps_val: fresh + value: Nature + - dps_val: heavy + value: Boost + - id: 8 + type: boolean + name: oscillate + - id: 13 + name: fault_code + type: bitfield +secondary_entities: + - entity: switch + name: Sound + icon: "mdi:volume-high" + category: config + dps: + - id: 101 + type: boolean + name: switch + - entity: binary_sensor + name: Fault + class: problem + category: diagnostic + dps: + - id: 13 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - entity: select + name: Timer + icon: "mdi:timer" + category: config + dps: + - id: 11 + type: string + name: option + mapping: + - dps_val: "0" + value: "Off" + - dps_val: "1" + value: "1 hour" + - dps_val: "2" + value: "2 hours" + - dps_val: "3" + value: "3 hours" + - dps_val: "4" + value: "4 hours" + - dps_val: "5" + value: "5 hours" + - dps_val: "6" + value: "6 hours" + - dps_val: "7" + value: "7 hours" + - dps_val: "8" + value: "8 hours" + + + + \ No newline at end of file From efb3fe93a5c0ef656257cdfa57507798a52ea087 Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Sat, 6 Jan 2024 19:14:24 +1100 Subject: [PATCH 38/74] Add files via upload --- .../tuya_local/devices/kogan_kasbkstfansa_fan.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml b/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml index faa0e39778..e7701b8311 100644 --- a/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml +++ b/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml @@ -104,7 +104,13 @@ secondary_entities: value: "7 hours" - dps_val: "8" value: "8 hours" - - - + - entity: sensor + name: Time Remaining + icon: "mdi:timer" + category: config + dps: + - id: 12 + type: string + name: sensor +# unit: mins \ No newline at end of file From 0fd522c404fa1154dea58a9ee52f613c9887e053 Mon Sep 17 00:00:00 2001 From: Samuel Myers <47462284+sambarlick@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:18:49 +1100 Subject: [PATCH 39/74] Add files via upload Fix time remaining sensor and added units. --- .../tuya_local/devices/kogan_kasbkstfansa_fan.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml b/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml index e7701b8311..4e7bc9134f 100644 --- a/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml +++ b/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml @@ -107,10 +107,9 @@ secondary_entities: - entity: sensor name: Time Remaining icon: "mdi:timer" - category: config dps: - id: 12 type: string name: sensor -# unit: mins + unit: mins \ No newline at end of file From 2bd30e54ec8fac3ca32b3e1a807d69dcc7fd3d9b Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 7 Feb 2024 13:38:17 +0800 Subject: [PATCH 40/74] Kogan aircons and fans: Changes from review - Arlec 6 speed fan: revert these undocumented changes that conflict with the original new device request - Kogan KASBKSTFANSA: merge with KASBLFAN1CSA - Kogan KABLFAN1CSA: naming changes, use translated presets rename to kogan_bladeless_fan.yaml, as it now covers two models. - Kogan air conditioners: add temperature selector, naming changes Product ids on these are suspicious - seems like the product codes from packaging, not what the tuya protocol reports. PR #1480 --- .../tuya_local/devices/arlec_6speed_fan.yaml | 20 ++-- ...ansa_fan.yaml => kogan_bladeless_fan.yaml} | 24 +++- .../devices/kogan_kablfan1csa_fan.yaml | 109 ------------------ .../kogan_kawfpac12ya_airconditioner.yaml | 53 ++++----- .../kogan_kawfpac16pya_airconditioner.yaml | 50 ++++---- 5 files changed, 74 insertions(+), 182 deletions(-) rename custom_components/tuya_local/devices/{kogan_kasbkstfansa_fan.yaml => kogan_bladeless_fan.yaml} (84%) delete mode 100644 custom_components/tuya_local/devices/kogan_kablfan1csa_fan.yaml diff --git a/custom_components/tuya_local/devices/arlec_6speed_fan.yaml b/custom_components/tuya_local/devices/arlec_6speed_fan.yaml index bf37051fbc..f6656cd9af 100644 --- a/custom_components/tuya_local/devices/arlec_6speed_fan.yaml +++ b/custom_components/tuya_local/devices/arlec_6speed_fan.yaml @@ -18,18 +18,18 @@ primary_entity: value: nature - dps_val: sleep value: sleep - # - dps_val: fresh - # value: fresh - # - dps_val: smart - # value: smart - # - dps_val: strong - # value: strong - # - dps_val: closed - # value: "off" + - dps_val: fresh + value: fresh + - dps_val: smart + value: smart + - dps_val: strong + value: strong + - dps_val: closed + value: "off" - dps_val: ordinary value: normal - # - dps_val: null - # value: "off" + - dps_val: null + value: "off" - id: 3 name: speed type: string diff --git a/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml b/custom_components/tuya_local/devices/kogan_bladeless_fan.yaml similarity index 84% rename from custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml rename to custom_components/tuya_local/devices/kogan_bladeless_fan.yaml index 4e7bc9134f..406ac56105 100644 --- a/custom_components/tuya_local/devices/kogan_kasbkstfansa_fan.yaml +++ b/custom_components/tuya_local/devices/kogan_bladeless_fan.yaml @@ -1,8 +1,12 @@ -name: Kogan Smart Bladeless Turbo Fan (Silver) +name: Bladeless fan products: + - id: kablfan1csa + name: Kogan KABLFAN1CSA - id: kasblstfansa + name: Kogan KASBKSTFANSA primary_entity: entity: fan + translation_key: fan_with_presets dps: - id: 1 type: boolean @@ -45,11 +49,11 @@ primary_entity: - dps_val: close value: "off" - dps_val: sleep - value: Sleep + value: sleep - dps_val: fresh - value: Nature + value: nature - dps_val: heavy - value: Boost + value: strong - id: 8 type: boolean name: oscillate @@ -62,9 +66,17 @@ secondary_entities: icon: "mdi:volume-high" category: config dps: - - id: 101 + - id: 102 type: boolean + optional: true name: switch + mapping: + - dps_val: null + value_redirect: alternate + - id: 101 + type: boolean + optional: true + name: alternate - entity: binary_sensor name: Fault class: problem @@ -110,6 +122,6 @@ secondary_entities: dps: - id: 12 type: string + optional: true name: sensor unit: mins - \ No newline at end of file diff --git a/custom_components/tuya_local/devices/kogan_kablfan1csa_fan.yaml b/custom_components/tuya_local/devices/kogan_kablfan1csa_fan.yaml deleted file mode 100644 index b5ad9ad66f..0000000000 --- a/custom_components/tuya_local/devices/kogan_kablfan1csa_fan.yaml +++ /dev/null @@ -1,109 +0,0 @@ -name: Kogan Smarterhome Bladeless Purifier Fan -products: - - id: kablfan1csa -primary_entity: - entity: fan - dps: - - id: 1 - type: boolean - name: switch - - id: 2 - type: string - name: speed - mapping: - - dps_val: "1" - value: 11 - step: 11 - - dps_val: "2" - value: 22 - step: 11 - - dps_val: "3" - value: 33 - step: 11 - - dps_val: "4" - value: 44 - step: 11 - - dps_val: "5" - value: 55 - step: 11 - - dps_val: "6" - value: 66 - step: 11 - - dps_val: "7" - value: 77 - step: 11 - - dps_val: "8" - value: 88 - step: 11 - - dps_val: "9" - value: 100 - step: 12 - - id: 3 - name: preset_mode - type: string - mapping: - - dps_val: close - value: "off" - - dps_val: sleep - value: Sleep - - dps_val: fresh - value: Nature - - dps_val: heavy - value: Boost - - id: 8 - type: boolean - name: oscillate - - id: 13 - name: fault_code - type: bitfield -secondary_entities: - - entity: switch - name: Sound - icon: "mdi:volume-high" - category: config - dps: - - id: 102 - type: boolean - name: switch - - entity: binary_sensor - name: Fault - class: problem - category: diagnostic - dps: - - id: 13 - type: bitfield - name: sensor - mapping: - - dps_val: 0 - value: false - - value: true - - entity: select - name: Timer - icon: "mdi:timer" - category: config - dps: - - id: 11 - type: string - name: option - mapping: - - dps_val: "0" - value: "Off" - - dps_val: "1" - value: "1 hour" - - dps_val: "2" - value: "2 hours" - - dps_val: "3" - value: "3 hours" - - dps_val: "4" - value: "4 hours" - - dps_val: "5" - value: "5 hours" - - dps_val: "6" - value: "6 hours" - - dps_val: "7" - value: "7 hours" - - dps_val: "8" - value: "8 hours" - - - diff --git a/custom_components/tuya_local/devices/kogan_kawfpac12ya_airconditioner.yaml b/custom_components/tuya_local/devices/kogan_kawfpac12ya_airconditioner.yaml index ef56be8475..cfeecdff27 100644 --- a/custom_components/tuya_local/devices/kogan_kawfpac12ya_airconditioner.yaml +++ b/custom_components/tuya_local/devices/kogan_kawfpac12ya_airconditioner.yaml @@ -1,7 +1,7 @@ -name: Kogan Y12 Airconditioner +name: Air conditioner products: - id: kawfpac12ya - name: Kogan Smart PAC_Y12 + name: Kogan PAC_Y12 primary_entity: entity: climate dps: @@ -24,20 +24,17 @@ primary_entity: - dps_val: DRY icon: "mdi:water" value: dry - # - dps_val: Heat - # icon: "mdi:heat-wave" - # value: heat - id: 2 name: temperature type: integer mapping: - constraint: temperature_unit conditions: - - dps_val: "C" + - dps_val: C range: min: 16 max: 32 - - dps_val: "F" + - dps_val: F range: min: 60 max: 90 @@ -48,33 +45,15 @@ primary_entity: name: mode type: string hidden: true - - - # conditions: - # - dps_val: COOL - # icon: "mdi:snowflake" - # value: cold - # - dps_val: FAN - # icon: "mdi:fan" - # value: wind - # - dps_val: DRY - # icon: "mdi:water" - # value: wet - # - dps_val: HEAT - # icon: "mdi:fire" - # value: hot - - - - id: 5 name: fan_mode - type: integer + type: string mapping: - - dps_val: 1 + - dps_val: "1" value: low - - dps_val: 2 + - dps_val: "2" value: medium - - dps_val: 3 + - dps_val: "3" value: high - id: 19 name: temperature_unit @@ -112,4 +91,18 @@ primary_entity: type: boolean - id: 110 name: unknown_110 - type: integer \ No newline at end of file + type: integer +secondary_entities: + - entity: select + name: Temperature unit + icon: "mdi:temperature_celsius" + category: config + dps: + - id: 19 + type: string + name: option + mapping: + - dps_val: C + value: Celsius + - dps_val: F + value: Fahrenheit diff --git a/custom_components/tuya_local/devices/kogan_kawfpac16pya_airconditioner.yaml b/custom_components/tuya_local/devices/kogan_kawfpac16pya_airconditioner.yaml index 3dfcc23663..f2f6f4cb33 100644 --- a/custom_components/tuya_local/devices/kogan_kawfpac16pya_airconditioner.yaml +++ b/custom_components/tuya_local/devices/kogan_kawfpac16pya_airconditioner.yaml @@ -1,7 +1,7 @@ -name: Kogan PY16 Airconditioner +name: Heat pump products: - id: kawfpac16pya - name: Kogan Smart PAC_PY16 + name: Kogan PAC_PY16 primary_entity: entity: climate dps: @@ -33,11 +33,11 @@ primary_entity: mapping: - constraint: temperature_unit conditions: - - dps_val: "C" + - dps_val: C range: min: 16 max: 32 - - dps_val: "F" + - dps_val: F range: min: 60 max: 90 @@ -48,33 +48,15 @@ primary_entity: name: mode type: string hidden: true - - - # conditions: - # - dps_val: COOL - # icon: "mdi:snowflake" - # value: cold - # - dps_val: FAN - # icon: "mdi:fan" - # value: wind - # - dps_val: DRY - # icon: "mdi:water" - # value: wet - # - dps_val: HEAT - # icon: "mdi:fire" - # value: hot - - - - id: 5 name: fan_mode - type: integer + type: string mapping: - - dps_val: 1 + - dps_val: "1" value: low - - dps_val: 2 + - dps_val: "2" value: medium - - dps_val: 3 + - dps_val: "3" value: high - id: 19 name: temperature_unit @@ -112,4 +94,18 @@ primary_entity: type: boolean - id: 110 name: unknown_110 - type: integer \ No newline at end of file + type: integer +secondary_entities: + - entity: select + name: Temperature unit + icon: "mdi:temperature_celsius" + category: config + dps: + - id: 19 + type: string + name: option + mapping: + - dps_val: C + value: Celsius + - dps_val: F + value: Fahrenheit From b33d3b4e436c09f333b0f03b40e70cb12f9dc612 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 8 Feb 2024 20:06:19 +0800 Subject: [PATCH 41/74] IH001 LED controller: do not use hex with mapping Hex is for when the value needs to be decoded to binary. When it is mapped to strings, the handling code gets confused Issue #1629 --- custom_components/tuya_local/devices/ih001_led_controller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/ih001_led_controller.yaml b/custom_components/tuya_local/devices/ih001_led_controller.yaml index 154c2930b1..d6546f1a94 100644 --- a/custom_components/tuya_local/devices/ih001_led_controller.yaml +++ b/custom_components/tuya_local/devices/ih001_led_controller.yaml @@ -58,7 +58,7 @@ secondary_entities: category: config dps: - id: 25 - type: hex + type: string name: option mapping: - dps_val: "000c0d0000000000000000c80000" From 987c06e6914842c48c3bcdf2dfa18237224e4a2d Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 8 Feb 2024 20:22:53 +0800 Subject: [PATCH 42/74] Asakuki diffuser, UStellar light bar: avoid hex with mappings Issue #1629 Review found same issue in these two device configs. --- custom_components/tuya_local/devices/asakuki_diffuser.yaml | 2 +- custom_components/tuya_local/devices/ustellar_ut99911_rgb.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/devices/asakuki_diffuser.yaml b/custom_components/tuya_local/devices/asakuki_diffuser.yaml index fdc4897cb9..9e5465cbb6 100644 --- a/custom_components/tuya_local/devices/asakuki_diffuser.yaml +++ b/custom_components/tuya_local/devices/asakuki_diffuser.yaml @@ -93,7 +93,7 @@ secondary_entities: category: config dps: - id: 108 - type: hex + type: string name: option mapping: - dps_val: "ff00000064ff" diff --git a/custom_components/tuya_local/devices/ustellar_ut99911_rgb.yaml b/custom_components/tuya_local/devices/ustellar_ut99911_rgb.yaml index 8f4e9c888a..fe34bb656f 100644 --- a/custom_components/tuya_local/devices/ustellar_ut99911_rgb.yaml +++ b/custom_components/tuya_local/devices/ustellar_ut99911_rgb.yaml @@ -76,7 +76,7 @@ secondary_entities: category: config dps: - id: 102 - type: hex + type: string name: option optional: true mapping: From e79fca6f533a1da831a5c6e7f7b43f60ec408eb8 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 8 Feb 2024 21:10:38 +0800 Subject: [PATCH 43/74] Hombli thermostat: dps 23, 104 are optional Issue #1621 Contrary to the comment on #1424, it seems dp 104 is not regularly sent, sso it is not suitable to use for hvac_action and need to be optional along with dp 23 as highlighted in #1621. --- .../hombli_thermostatic_radiator_valve.yaml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/custom_components/tuya_local/devices/hombli_thermostatic_radiator_valve.yaml b/custom_components/tuya_local/devices/hombli_thermostatic_radiator_valve.yaml index ba41a92d71..e936a3249f 100644 --- a/custom_components/tuya_local/devices/hombli_thermostatic_radiator_valve.yaml +++ b/custom_components/tuya_local/devices/hombli_thermostatic_radiator_valve.yaml @@ -35,19 +35,6 @@ primary_entity: value: "away" - dps_val: false value: "home" - - id: 104 - type: integer - name: hvac_action - mapping: - - constraint: hvac_mode - conditions: - - dps_val: false - value: "off" - - dps_val: true - mapping: - - dps_val: 0 - value: idle - - value: heating secondary_entities: - entity: switch name: Window check @@ -73,6 +60,7 @@ secondary_entities: - id: 23 type: string name: option + optional: true mapping: - dps_val: "c" value: Celsius @@ -136,5 +124,6 @@ secondary_entities: dps: - id: 104 type: integer + optional: true name: sensor unit: "%" From f41fb09dcf0f958c4900feb804636e2af1e685cd Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 8 Feb 2024 21:17:54 +0800 Subject: [PATCH 44/74] Docs for PR #1480 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index e0d6477ad3..7ce42af177 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -483,3 +483,4 @@ Further device support has been made with the assistance of users. Please consid - [sergeymatsay](https://github.com/sergeymatsay) for assisting with support for Avatto ME81 thermostats. - [hrenki](https://github.com/hrenki) for assisting with support for Tesla TAF series air conditioners. - [FSJHecker](https://github.com/FSJHecker) for contributing support for CleanAir 604B humidifiers. +- [sambarlick](https://github.com/sambarlick) for contributing support for Kogan bladeless fans and Y12 and Y16 air conditioners. diff --git a/DEVICES.md b/DEVICES.md index 6baadb451e..8418b3f43f 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -70,7 +70,7 @@ - Fisher Summer air conditioner - Idea Heating Belt (with CS1 USB dongle) - Inventor Leon (Tokens Legend series) air conditioner -- Kogan 2.6kW portable air conditioner +- Kogan portable air conditioners (Y09, Y12, Y16) - Lyfco OL-A012 air conditioner - Monzana Klimaanlage air conditioner - Nedis ACMB1WT12 portable air conditioner @@ -188,6 +188,7 @@ - Immax Neo Lite Vento ceiling fan with light - Ledkia fan and light controller - Lexy F501 fan +- Kogan bladeless fans - Mantra ceiling fan with light - Ovlaim ceiling fan with cool/warm white dimmable light - Reiga 52 ceiling fan with light From e0a3823832e1ea547d5395b71d67685ea4119c96 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 8 Feb 2024 22:37:00 +0800 Subject: [PATCH 45/74] Add support for Tonepie cat litter box Issue #1541 --- ACKNOWLEDGEMENTS.md | 3 +- DEVICES.md | 1 + .../devices/tonepie_t1pro_catlitterbox.yaml | 246 ++++++++++++++++++ 3 files changed, 249 insertions(+), 1 deletion(-) create mode 100644 custom_components/tuya_local/devices/tonepie_t1pro_catlitterbox.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 7ce42af177..c135f1e46a 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -483,4 +483,5 @@ Further device support has been made with the assistance of users. Please consid - [sergeymatsay](https://github.com/sergeymatsay) for assisting with support for Avatto ME81 thermostats. - [hrenki](https://github.com/hrenki) for assisting with support for Tesla TAF series air conditioners. - [FSJHecker](https://github.com/FSJHecker) for contributing support for CleanAir 604B humidifiers. -- [sambarlick](https://github.com/sambarlick) for contributing support for Kogan bladeless fans and Y12 and Y16 air conditioners. +- [sambarlick](https://github.com/sambarlick) for contributing support for Kogan bladeless fans and Y12 and Y16 air conditioners. +- [AproveIPD](https://github.com/AproveIPD) for assisting with support for Tonepie T1PRO cat litter box. diff --git a/DEVICES.md b/DEVICES.md index 8418b3f43f..3a593cc461 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -621,6 +621,7 @@ port and password. - SWS-001 smart weather station - TH08 temperature and humidity sensor - TH16 temperature and humidity sensor +- Tonepie T1PRO automatic cat litter box - Tontine electric blanket - Valehaus SYZN119 towel warmer - WeatherStation Pro diff --git a/custom_components/tuya_local/devices/tonepie_t1pro_catlitterbox.yaml b/custom_components/tuya_local/devices/tonepie_t1pro_catlitterbox.yaml new file mode 100644 index 0000000000..01bec5792f --- /dev/null +++ b/custom_components/tuya_local/devices/tonepie_t1pro_catlitterbox.yaml @@ -0,0 +1,246 @@ +name: Cat litter box +products: + - id: 5t7esmqqh92ssbe5 + name: Tonepie T1Pro +primary_entity: + entity: sensor + name: Cat weight + icon: "mdi:cat" + class: weight + dps: + - id: 6 + type: integer + name: sensor + unit: kg + class: measurement + mapping: + - scale: 1000 + - id: 128 + type: integer + name: number +secondary_entities: + - entity: sensor + name: Times per day + icon: "mdi:emoticon-poop" + dps: + - id: 7 + type: integer + name: sensor + unit: visits + - entity: sensor + name: Time spent today + mdi: "mdi:emoticon-poop" + class: duration + dps: + - id: 8 + type: integer + name: sensor + unit: s + class: measurement + - entity: switch + name: Deodorize + icon: "mdi:scent" + category: config + dps: + - id: 17 + type: boolean + name: switch + - entity: binary_sensor + name: Fault + class: problem + category: diagnostic + dps: + - id: 22 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - id: 22 + type: bitfield + name: fault_code + - entity: button + name: Clean + icon: "mdi:shimmer" + dps: + - id: 101 + type: boolean + name: button + - entity: button + name: Empty + icon: "mdi:delete-empty" + dps: + - id: 102 + type: boolean + name: button + - entity: event + name: Bin full + dps: + - id: 103 + type: boolean + name: event + optional: true + persist: false + - entity: binary_sensor + class: occupancy + icon: "mdi:cat" + dps: + - id: 104 + type: boolean + name: sensor + - entity: switch + name: Auto clean + category: config + icon: "mdi:shimmer" + dps: + - id: 105 + type: boolean + name: switch + - id: 106 + type: string + optional: true + name: schedule + - id: 107 + type: boolean + optional: true + name: scheduled_clean + - id: 108 + type: string + optional: true + name: cleantaste_schedule + - id: 109 + type: boolean + name: cleantaste_switch + - id: 110 + type: string + optional: true + name: do_not_disturb_schedule + - entity: switch + name: Infrared detection + category: config + dps: + - id: 111 + type: boolean + name: switch + mapping: + - dps_val: false + value: true + - dps_val: true + value: false + - entity: lock + name: Child lock + icon: "mdi:hand-back-right-off" + category: config + dps: + - id: 114 + type: boolean + name: lock + - entity: number + name: Clean wait time + category: config + icon: "mdi:timer" + dps: + - id: 117 + type: integer + name: value + unit: min + range: + min: 0 + max: 60 + - entity: number + name: Clean interval + category: config + icon: "mdi:update" + dps: + - id: 118 + type: integer + name: value + unit: min + range: + min: 0 + max: 120 + - entity: switch + name: Bin full notification + category: config + icon: "mdi:message-alert" + dps: + - id: 119 + type: boolean + name: sensor + - entity: switch + name: Odourless + category: config + icon: "mdi:flower" + dps: + - id: 120 + type: boolean + name: switch + - entity: switch + name: Smart clean + icon: "mdi:shimmer" + category: config + dps: + - id: 121 + type: boolean + name: switch + - entity: switch + name: Do not disturb + icon: "mdi:power-sleep" + category: config + dps: + - id: 122 + type: boolean + name: switch + - entity: sensor + name: Number of times used + category: diagnostic + dps: + - id: 123 + type: integer + name: sensor + unit: times + - entity: number + name: Bin capacity calibration + category: config + icon: "mdi:trash-can" + dps: + - id: 124 + type: integer + name: value + range: + min: 0 + max: 15 + - entity: number + name: Litter calibration + category: config + icon: "mdi:grain" + dps: + - id: 125 + type: integer + name: value + range: + min: 0 + max: 6 + - entity: switch + name: Auto deodorize + category: config + icon: "mdi:flower" + dps: + - id: 126 + type: boolean + name: switch + - entity: number + name: Detection sensitivity + category: config + icon: "mdi:scale" + dps: + - id: 127 + type: integer + name: value + unit: g + range: + min: 600 + max: 1500 + mapping: + - step: 100 From 6483c6ba23b027f5554379635477cdea9f49bfbe Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 8 Feb 2024 22:56:36 +0800 Subject: [PATCH 46/74] Tonepie cat litter: fix switch definition --- .../tuya_local/devices/tonepie_t1pro_catlitterbox.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/tonepie_t1pro_catlitterbox.yaml b/custom_components/tuya_local/devices/tonepie_t1pro_catlitterbox.yaml index 01bec5792f..7c20841136 100644 --- a/custom_components/tuya_local/devices/tonepie_t1pro_catlitterbox.yaml +++ b/custom_components/tuya_local/devices/tonepie_t1pro_catlitterbox.yaml @@ -167,7 +167,7 @@ secondary_entities: dps: - id: 119 type: boolean - name: sensor + name: switch - entity: switch name: Odourless category: config From 5bafe7665e575668c5c1bebbf5e92f57e622d889 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 9 Feb 2024 09:46:20 +0800 Subject: [PATCH 47/74] light: supported_color_modes shoud return a set not a list. This is now enforced in HA 2024.2. Issue #1631 (simplified version of PR #1633) --- custom_components/tuya_local/light.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/tuya_local/light.py b/custom_components/tuya_local/light.py index b82018e43f..412b2939d5 100644 --- a/custom_components/tuya_local/light.py +++ b/custom_components/tuya_local/light.py @@ -68,16 +68,16 @@ def __init__(self, device: TuyaLocalDevice, config: TuyaEntityConfig): def supported_color_modes(self): """Return the supported color modes for this light.""" if self._color_mode_dps: - return [ + return { ColorMode(mode) for mode in self._color_mode_dps.values(self._device) if mode and hasattr(ColorMode, mode.upper()) - ] + } else: try: mode = ColorMode(self.color_mode) if mode and mode != ColorMode.UNKNOWN: - return [mode] + return {mode} except ValueError: _LOGGER.warning( "%s/%s: Unrecognised color mode %s ignored", @@ -85,7 +85,7 @@ def supported_color_modes(self): self.name or "light", self.color_mode, ) - return [] + return set() @property def supported_features(self): From d54d48140842aa9bcb7febdf5991d19c7116bf93 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 9 Feb 2024 10:04:53 +0800 Subject: [PATCH 48/74] credits --- ACKNOWLEDGEMENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index c135f1e46a..485c13152b 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -485,3 +485,4 @@ Further device support has been made with the assistance of users. Please consid - [FSJHecker](https://github.com/FSJHecker) for contributing support for CleanAir 604B humidifiers. - [sambarlick](https://github.com/sambarlick) for contributing support for Kogan bladeless fans and Y12 and Y16 air conditioners. - [AproveIPD](https://github.com/AproveIPD) for assisting with support for Tonepie T1PRO cat litter box. +- [hyperb1iss](https://github.com/hyperb1iss) for contributing a fix for lights in HA 2024.2 From 68f591d01c0379e9094dae09a03d41c8aba0b00a Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Fri, 9 Feb 2024 13:22:58 +0800 Subject: [PATCH 49/74] Add support for Moes IR/RF rmot controllers Probably only working for IR. Issue #929 --- ACKNOWLEDGEMENTS.md | 3 +- DEVICES.md | 1 + .../tuya_local/devices/moes_rfir_remote.yaml | 33 +++++++++++++++++++ custom_components/tuya_local/manifest.json | 2 +- 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 custom_components/tuya_local/devices/moes_rfir_remote.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 485c13152b..eb238c27cf 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -231,7 +231,7 @@ Further device support has been made with the assistance of users. Please consid - [Die-Meester](https://github.com/Die-Meester) for contributing support for CBI Astute smart switches. - [ResteNarquois](https://github.com/ResteNarquois) for assisting with support for Zemismart roller shades. - [grangoni](https://github.com/grangoni) for contributing support for PH-W218 water quality monitors. -- [antonio1475](https://github.com/antonio1475) for contributing support for Rojeco pet feeders and assisting with support for Mellerware and Lefant N3 vacuums. +- [antonio1475](https://github.com/antonio1475) for contributing support for Rojeco pet feeders and assisting with support for Mellerware and Lefant N3 vacuums, and IR controller pro. - [erelke](https://github.com/erelke) for contributing Hungarian translations and support for EARU breakers, simple contact sensor, simple gate opener, and smart siren alarms. - [p-owerscripter](https://github.com/p-owerscripter) for contributing support for KKMoon air quality monitors. - [cataseven](https://github.com/cataseven) for contributing support for SM07-8 sprinkler controllers. @@ -486,3 +486,4 @@ Further device support has been made with the assistance of users. Please consid - [sambarlick](https://github.com/sambarlick) for contributing support for Kogan bladeless fans and Y12 and Y16 air conditioners. - [AproveIPD](https://github.com/AproveIPD) for assisting with support for Tonepie T1PRO cat litter box. - [hyperb1iss](https://github.com/hyperb1iss) for contributing a fix for lights in HA 2024.2 +- [mikekornikh](https://github.com/mikekornikh) for assisting with support for Moes IR/RF remote controller. diff --git a/DEVICES.md b/DEVICES.md index 3a593cc461..8e4ac13629 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -579,6 +579,7 @@ port and password. ### Remote controllers - Arlec HUBRF06HA RF 8x8 learning remote transmitter +- Moes IR/RF remote controller (also IR controller pro, may work only for IR) - Universal remote control with temperature and humidity sensors ### Miscellaneous diff --git a/custom_components/tuya_local/devices/moes_rfir_remote.yaml b/custom_components/tuya_local/devices/moes_rfir_remote.yaml new file mode 100644 index 0000000000..61217c48fb --- /dev/null +++ b/custom_components/tuya_local/devices/moes_rfir_remote.yaml @@ -0,0 +1,33 @@ +name: Remote controller +products: + - id: wbaloeb3kiwwhads + name: Moes RF/IR remote + - id: 0gawnyfgyneswent + name: IR Controller Pro +primary_entity: + entity: remote + dps: + - id: 201 + name: send + type: string + optional: true + - id: 202 + name: receive + type: string + optional: true + persist: false + - id: 1 + type: string + name: scene_1 + - id: 2 + type: string + optional: true + name: scene_2 + - id: 3 + type: string + optional: true + name: scene_3 + - id: 4 + type: string + optional: true + name: scene_4 diff --git a/custom_components/tuya_local/manifest.json b/custom_components/tuya_local/manifest.json index c27dec08f4..9f02749708 100644 --- a/custom_components/tuya_local/manifest.json +++ b/custom_components/tuya_local/manifest.json @@ -9,5 +9,5 @@ "iot_class": "local_push", "issue_tracker": "https://github.com/make-all/tuya-local/issues", "requirements": ["tinytuya==1.13.1"], - "version": "2024.2.0" + "version": "2024.2.1" } From 539a7da4f704064e24207b51bb61c035e413bc5a Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 10 Feb 2024 21:51:32 +0900 Subject: [PATCH 50/74] ZN373186 temp/humidity: make battery sensor optional Battery is apparently not reeported consistently with these sensors. Issue #1636 --- .../tuya_local/devices/zigbee_zn373186_temphumid_sensor.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/tuya_local/devices/zigbee_zn373186_temphumid_sensor.yaml b/custom_components/tuya_local/devices/zigbee_zn373186_temphumid_sensor.yaml index d61d1dc29a..8ab365e5bf 100644 --- a/custom_components/tuya_local/devices/zigbee_zn373186_temphumid_sensor.yaml +++ b/custom_components/tuya_local/devices/zigbee_zn373186_temphumid_sensor.yaml @@ -31,5 +31,6 @@ secondary_entities: - id: 4 type: integer name: sensor + optional: true unit: "%" class: measurement From 7f8210c4ed4855d3341cd5111fd2e895edfa2ff5 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 11 Feb 2024 19:22:07 +0900 Subject: [PATCH 51/74] Use HA scaling functions for fan speed and light brightness HA 2024.1 introduced some new functions for scaling percentages and light brightness. Using these should give standardised behaviour compared with other integrations. User visible changes: - lights that do not allow brightness to be set all the way down to 1% will now adjust their range to use the full range available in HA. - fan speeds scale to integers. This mostly affects the speeds reported by 3 speed and 6 speed fans Developer visible changes: - it is no longer neccesary to specify scale mappings for light brightness or fan speed. Since these have a fixed range in HA, they are automatically scaled into that range. - TuyaDpsConfig.range now returns a (min, max) tuple compatible with the HA scaling functions instead of a dict with min and max items. Issue #1444 --- custom_components/tuya_local/climate.py | 8 +++---- .../tuya_local/devices/README.md | 7 +++--- .../devices/advancedfires_1500_fireplace.yaml | 6 ----- .../tuya_local/devices/arlec_19speed_fan.yaml | 4 +--- .../devices/arlec_ceiling_fan_remote.yaml | 2 -- .../tuya_local/devices/arlec_fan.yaml | 4 +--- .../tuya_local/devices/arlec_fan_light.yaml | 5 +---- .../tuya_local/devices/aspen_asp200_fan.yaml | 4 +--- .../tuya_local/devices/atomi_ceiling_fan.yaml | 6 +---- .../devices/atorch_at2pl_breaker.yaml | 4 ---- .../tuya_local/devices/ble_solar_light.yaml | 3 +-- .../tuya_local/devices/blitzwolf_bw_lt31.yaml | 2 -- .../devices/breville_airdynamic3d_fan.yaml | 2 -- .../devices/cadence_aroma_diffuser.yaml | 2 -- .../devices/carro_pn04f02d_fan_light.yaml | 12 +++------- .../carro_smart_ceiling_fan_light.yaml | 6 ----- .../devices/casafan_ceiling_fan_light.yaml | 4 ---- .../tuya_local/devices/cct_lightbulb.yaml | 2 -- .../tuya_local/devices/cecotec_fan_light.yaml | 3 --- .../tuya_local/devices/chanfok_fan_light.yaml | 6 +---- .../devices/deta_dimmer_switch.yaml | 2 -- .../tuya_local/devices/deta_fan.yaml | 4 +--- .../tuya_local/devices/dimming_lightbulb.yaml | 2 -- .../tuya_local/devices/djive_arc_fan.yaml | 4 +--- .../devices/dreamlight_led_strip.yaml | 1 - .../devices/fanco_ecosilentdeluxe.yaml | 6 +---- .../tuya_local/devices/feit_dimmer.yaml | 2 -- .../devices/galaxy_projector_light.yaml | 2 -- .../ge_jasco_ultra_pro_toggle_dimmer_v2.yaml | 2 -- .../devices/goldair_101cm_tower_fan.yaml | 4 +--- .../tuya_local/devices/goldair_fan.yaml | 5 ++--- .../devices/goldair_platinum_tower_fan.yaml | 4 +--- .../tuya_local/devices/hdmi_sync_light.yaml | 2 -- .../devices/immax_neo_light_vento.yaml | 5 ++--- .../tuya_local/devices/ledkia_fan_light.yaml | 6 +---- .../tuya_local/devices/lexy_f501_fan.yaml | 4 +--- .../devices/loycco_sound_nightlight.yaml | 2 -- .../devices/lytmi_hdmisync_backlight.yaml | 2 -- .../tuya_local/devices/mantra_fan.yaml | 2 -- .../devices/marpou_ceiling_lamp_ledlight.yaml | 1 - .../devices/modernflames_orion_fireplace.yaml | 2 -- .../tuya_local/devices/moes_dimmer.yaml | 2 -- .../devices/moes_star_projector.yaml | 2 -- .../tuya_local/devices/moesgo_dimmer.yaml | 2 -- .../devices/momcozy_white_noise_machine.yaml | 2 -- .../momcozy_white_noise_machine_v2.yaml | 2 -- .../devices/mrc_magnum_floorheater.yaml | 2 -- .../devices/ovlaim_ceiling_fan_light.yaml | 2 -- .../tuya_local/devices/pir_rgbcw_light.yaml | 2 -- .../tuya_local/devices/pir_spotlight.yaml | 2 -- .../devices/reiga_52_fan_light.yaml | 2 -- .../tuya_local/devices/rgbcw_lightbulb.yaml | 1 - .../tuya_local/devices/rgbw_lightbulbv2.yaml | 2 -- .../devices/simple_rgbcw_lightbulb.yaml | 2 -- .../tuya_local/devices/skyfan_dc_fan.yaml | 4 +--- .../tuya_local/devices/skyfan_fan_light.yaml | 6 +---- .../tuya_local/devices/smart_led_strip.yaml | 1 - .../devices/soleusair_air_purifier.yaml | 2 -- .../devices/space_dog_music_lamp.yaml | 2 -- .../devices/stirling_fs140dc_fan.yaml | 4 +--- .../devices/sulion_ceiling_fan.yaml | 2 -- .../tuya_local/devices/t5e_wf_thermostat.yaml | 1 - .../tuya_local/devices/tampa_led_system.yaml | 2 -- .../devices/tesla_air_purifier_pro.yaml | 8 +++---- .../tuya_local/devices/tmwf02_fan.yaml | 2 +- .../devices/treatlife_ds03_fan_light.yaml | 3 +-- .../devices/treatlife_dual_plugin_dimmer.yaml | 4 ---- .../tuya_local/devices/tv_backlights.yaml | 7 +----- .../devices/ustellar_ut99911_rgb.yaml | 2 -- .../devices/wf39m_dimmer_smartplug.yaml | 2 -- .../wf520d_wifi_dual_touch_dimmer.yaml | 4 ---- .../tuya_local/devices/windcalm_fan.yaml | 4 +--- .../devices/windcalm_fan_with_light.yaml | 6 +---- .../devices/yidi_fan_light_switch.yaml | 2 +- .../devices/yx316wifi_aroma_diffuser.yaml | 2 -- .../tuya_local/devices/zigbee_smart_bulb.yaml | 2 -- custom_components/tuya_local/fan.py | 22 ++++++++++++++++--- .../tuya_local/helpers/device_config.py | 12 +++++----- custom_components/tuya_local/humidifier.py | 4 ++-- custom_components/tuya_local/light.py | 21 ++++++++++++++++-- custom_components/tuya_local/number.py | 4 ++-- custom_components/tuya_local/water_heater.py | 4 ++-- hacs.json | 2 +- tests/devices/test_arlec_fan_light.py | 2 +- tests/devices/test_aspen_adv200_fan.py | 8 +++---- tests/devices/test_beca_bhp6000_thermostat.py | 4 ++-- .../devices/test_betterlife_bl1500_heater.py | 4 ++-- tests/devices/test_deta_fan.py | 4 ++-- ...est_digoo_dgsp01_dual_nightlight_switch.py | 4 ++-- tests/devices/test_eberg_cooly_c35hd.py | 4 ++-- .../devices/test_eberg_qubo_q40hd_heatpump.py | 4 ++-- tests/devices/test_eurom_600_heater.py | 4 ++-- tests/devices/test_eurom_600v2_heater.py | 6 ++--- tests/devices/test_eurom_601_heater.py | 4 ++-- tests/devices/test_fersk_vind_2_climate.py | 4 ++-- tests/devices/test_goldair_geco_heater.py | 4 ++-- tests/devices/test_goldair_gpph_heater.py | 20 ++++++++--------- tests/devices/test_hydrotherm_dynamicx8.py | 4 ++-- tests/devices/test_immax_neo_light_vento.py | 6 ++--- .../test_kogan_kawfpac09ya_airconditioner.py | 4 ++-- tests/devices/test_moes_rgb_socket.py | 4 ++-- .../test_nashone_mts700wb_thermostat.py | 4 ++-- tests/devices/test_nedis_htpl20f_heater.py | 4 ++-- tests/devices/test_poolex_qline_heatpump.py | 6 ++--- tests/devices/test_rgbcw_lightbulb.py | 4 ++-- tests/devices/test_stirling_fs140dc_fan.py | 2 +- tests/devices/test_weau_pool_heatpumpv2.py | 4 ++-- tests/devices/test_wetair_wch750_heater.py | 4 ++-- tests/test_light.py | 5 +---- 109 files changed, 154 insertions(+), 295 deletions(-) diff --git a/custom_components/tuya_local/climate.py b/custom_components/tuya_local/climate.py index debf4f4810..5eeeb1519d 100644 --- a/custom_components/tuya_local/climate.py +++ b/custom_components/tuya_local/climate.py @@ -209,7 +209,7 @@ def min_temp(self): r = self._temp_low_dps.range(self._device) else: r = self._temperature_dps.range(self._device) - return DEFAULT_MIN_TEMP if r is None else r["min"] + return DEFAULT_MIN_TEMP if r is None else r[0] @property def max_temp(self): @@ -226,7 +226,7 @@ def max_temp(self): r = self._temp_high_dps.range(self._device) else: r = self._temperature_dps.range(self._device) - return DEFAULT_MAX_TEMP if r is None else r["max"] + return DEFAULT_MAX_TEMP if r is None else r[1] async def async_set_temperature(self, **kwargs): """Set new target temperature.""" @@ -284,7 +284,7 @@ def min_humidity(self): if self._humidity_dps is None: return None r = self._humidity_dps.range(self._device) - return DEFAULT_MIN_HUMIDITY if r is None else r["min"] + return DEFAULT_MIN_HUMIDITY if r is None else r[0] @property def max_humidity(self): @@ -292,7 +292,7 @@ def max_humidity(self): if self._humidity_dps is None: return None r = self._humidity_dps.range(self._device) - return DEFAULT_MAX_HUMIDITY if r is None else r["max"] + return DEFAULT_MAX_HUMIDITY if r is None else r[1] async def async_set_humidity(self, humidity: int): if self._humidity_dps is None: diff --git a/custom_components/tuya_local/devices/README.md b/custom_components/tuya_local/devices/README.md index 51444e50c1..b58c8d11d4 100644 --- a/custom_components/tuya_local/devices/README.md +++ b/custom_components/tuya_local/devices/README.md @@ -582,8 +582,9 @@ Either **position** or **open** should be specified. - **switch** (optional, boolean): a dp to control the power state of the fan - **preset_mode** (optional, mapping of strings): a dp to control different modes of the fan. Values `"off", low, medium, high` used to be handled specially by HA as deprecated speed aliases. If these are the only "presets", consider mapping them as **speed** values instead, as voice assistants will respond to phrases like "turn the fan up/down" for speed. -- **speed** (optional, number 0-100): a dp to control the speed of the fan (%). - scale and step can be used to convert smaller ranges to percentages, or a mapping for discrete values. +- **speed** (optional, number): a dp to control the speed of the fan (%). + if a range is supplied, it will be automatically scaled to the 0-100 range. + if a mapping is used for dicrete steps, the values must be mapped within that range. - **oscillate** (optional, boolean): a dp to control whether the fan will oscillate or not. - **direction** (optional, string): a dp to control the spin direction of the fan. Valid values are `forward, reverse`. @@ -603,7 +604,7 @@ Humidifer can also cover dehumidifiers (use class to specify which). ### `light` - **switch** (optional, boolean): a dp to control the on/off state of the light -- **brightness** (optional, number 0-255): a dp to control the dimmer if available. +- **brightness** (optional, number): a dp to control the dimmer if available. If a range is provided, the value will be automatically scaled into the 0-255 range for HA, so there is no need to provide a scale. If there is a fixed list of mappings, the values should be between 0 (off) and 255 (full brightness). If there is no switch dp, a brightness of 0 will be sent to turn the light off. - **color_temp** (optional, number): a dp to control the color temperature if available. See `target_range` above for mapping Tuya's range into Kelvin. - **rgbhsv** (optional, hex): a dp to control the color of the light, using encoded RGB and HSV values. The `format` field names recognized for decoding this field are `r`, `g`, `b`, `h`, `s`, `v`. diff --git a/custom_components/tuya_local/devices/advancedfires_1500_fireplace.yaml b/custom_components/tuya_local/devices/advancedfires_1500_fireplace.yaml index d5b9f78196..adb5360edc 100644 --- a/custom_components/tuya_local/devices/advancedfires_1500_fireplace.yaml +++ b/custom_components/tuya_local/devices/advancedfires_1500_fireplace.yaml @@ -105,8 +105,6 @@ secondary_entities: min: 0 max: 100 optional: true - mapping: - - scale: 0.392 - id: 109 name: rgbhsv type: base64 @@ -173,8 +171,6 @@ secondary_entities: range: min: 0 max: 100 - mapping: - - scale: 0.392 - id: 110 name: rgbhsv type: base64 @@ -219,8 +215,6 @@ secondary_entities: range: min: 0 max: 100 - mapping: - - scale: 0.392 - id: 111 name: rgbhsv type: base64 diff --git a/custom_components/tuya_local/devices/arlec_19speed_fan.yaml b/custom_components/tuya_local/devices/arlec_19speed_fan.yaml index fee130beb5..e7fd901321 100644 --- a/custom_components/tuya_local/devices/arlec_19speed_fan.yaml +++ b/custom_components/tuya_local/devices/arlec_19speed_fan.yaml @@ -23,10 +23,8 @@ primary_entity: name: speed type: integer range: - min: 0 + min: 1 max: 19 - mapping: - - scale: 0.19 - id: 5 name: oscillate type: boolean diff --git a/custom_components/tuya_local/devices/arlec_ceiling_fan_remote.yaml b/custom_components/tuya_local/devices/arlec_ceiling_fan_remote.yaml index fed76ffe8d..bfc5dca9c7 100644 --- a/custom_components/tuya_local/devices/arlec_ceiling_fan_remote.yaml +++ b/custom_components/tuya_local/devices/arlec_ceiling_fan_remote.yaml @@ -14,8 +14,6 @@ primary_entity: range: min: 1 max: 3 - mapping: - - scale: 0.03 secondary_entities: - entity: light dps: diff --git a/custom_components/tuya_local/devices/arlec_fan.yaml b/custom_components/tuya_local/devices/arlec_fan.yaml index 25661f5d3a..69325f42f1 100644 --- a/custom_components/tuya_local/devices/arlec_fan.yaml +++ b/custom_components/tuya_local/devices/arlec_fan.yaml @@ -10,10 +10,8 @@ primary_entity: name: speed type: integer range: - min: 0 + min: 1 max: 6 - mapping: - - scale: 0.06 - id: 4 name: direction type: string diff --git a/custom_components/tuya_local/devices/arlec_fan_light.yaml b/custom_components/tuya_local/devices/arlec_fan_light.yaml index eb43516511..8891237152 100644 --- a/custom_components/tuya_local/devices/arlec_fan_light.yaml +++ b/custom_components/tuya_local/devices/arlec_fan_light.yaml @@ -10,10 +10,8 @@ primary_entity: name: speed type: integer range: - min: 0 + min: 1 max: 6 - mapping: - - scale: 0.06 - id: 4 name: direction type: string @@ -39,7 +37,6 @@ secondary_entities: max: 100 mapping: - step: 2 - scale: 0.392 - id: 11 type: integer name: color_temp diff --git a/custom_components/tuya_local/devices/aspen_asp200_fan.yaml b/custom_components/tuya_local/devices/aspen_asp200_fan.yaml index 35593ca32f..bc4a9524a0 100644 --- a/custom_components/tuya_local/devices/aspen_asp200_fan.yaml +++ b/custom_components/tuya_local/devices/aspen_asp200_fan.yaml @@ -21,10 +21,8 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 3 - mapping: - - scale: 0.03 - id: 101 type: boolean name: preset_mode diff --git a/custom_components/tuya_local/devices/atomi_ceiling_fan.yaml b/custom_components/tuya_local/devices/atomi_ceiling_fan.yaml index 6651aba57e..a8811e4e5d 100644 --- a/custom_components/tuya_local/devices/atomi_ceiling_fan.yaml +++ b/custom_components/tuya_local/devices/atomi_ceiling_fan.yaml @@ -21,10 +21,8 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 3 - mapping: - - scale: 0.03 - id: 71 type: string name: unknown_71 @@ -47,8 +45,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 23 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/atorch_at2pl_breaker.yaml b/custom_components/tuya_local/devices/atorch_at2pl_breaker.yaml index a267c4d1dd..acb32dd098 100644 --- a/custom_components/tuya_local/devices/atorch_at2pl_breaker.yaml +++ b/custom_components/tuya_local/devices/atorch_at2pl_breaker.yaml @@ -148,8 +148,6 @@ secondary_entities: range: min: 1 max: 9 - mapping: - - scale: 0.0353 - entity: light name: Display standby category: config @@ -160,8 +158,6 @@ secondary_entities: range: min: 0 max: 9 - mapping: - - scale: 0.0353 - entity: number name: Standby delay category: config diff --git a/custom_components/tuya_local/devices/ble_solar_light.yaml b/custom_components/tuya_local/devices/ble_solar_light.yaml index 0d2c838f2c..ac60f3f656 100644 --- a/custom_components/tuya_local/devices/ble_solar_light.yaml +++ b/custom_components/tuya_local/devices/ble_solar_light.yaml @@ -27,8 +27,7 @@ primary_entity: min: 10 max: 1000 mapping: - - scale: 3.92 - constraint: standby + - constraint: standby conditions: - dps_val: true value_redirect: standby_brightness diff --git a/custom_components/tuya_local/devices/blitzwolf_bw_lt31.yaml b/custom_components/tuya_local/devices/blitzwolf_bw_lt31.yaml index c899d07838..5467432621 100644 --- a/custom_components/tuya_local/devices/blitzwolf_bw_lt31.yaml +++ b/custom_components/tuya_local/devices/blitzwolf_bw_lt31.yaml @@ -28,8 +28,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 24 name: rgbhsv type: hex diff --git a/custom_components/tuya_local/devices/breville_airdynamic3d_fan.yaml b/custom_components/tuya_local/devices/breville_airdynamic3d_fan.yaml index e2c99b6378..07b9aca54a 100644 --- a/custom_components/tuya_local/devices/breville_airdynamic3d_fan.yaml +++ b/custom_components/tuya_local/devices/breville_airdynamic3d_fan.yaml @@ -14,8 +14,6 @@ primary_entity: range: min: 0 max: 8 - mapping: - - scale: 0.08 - id: 2 type: string name: preset_mode diff --git a/custom_components/tuya_local/devices/cadence_aroma_diffuser.yaml b/custom_components/tuya_local/devices/cadence_aroma_diffuser.yaml index 5db6c66dc8..41374661c5 100644 --- a/custom_components/tuya_local/devices/cadence_aroma_diffuser.yaml +++ b/custom_components/tuya_local/devices/cadence_aroma_diffuser.yaml @@ -41,8 +41,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 # 10: rgbhsv, but not present in log and no color_mode to select it, # so probably a doc error - id: 105 diff --git a/custom_components/tuya_local/devices/carro_pn04f02d_fan_light.yaml b/custom_components/tuya_local/devices/carro_pn04f02d_fan_light.yaml index 3bd29f6cb4..cb3326040d 100644 --- a/custom_components/tuya_local/devices/carro_pn04f02d_fan_light.yaml +++ b/custom_components/tuya_local/devices/carro_pn04f02d_fan_light.yaml @@ -20,8 +20,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 28 type: string name: control_data @@ -35,10 +33,6 @@ secondary_entities: - id: 62 type: integer name: speed - mapping: - - dps_val: 1 - value: 33 - - dps_val: 2 - value: 66 - - dps_val: 3 - value: 100 + range: + min: 1 + max: 3 diff --git a/custom_components/tuya_local/devices/carro_smart_ceiling_fan_light.yaml b/custom_components/tuya_local/devices/carro_smart_ceiling_fan_light.yaml index 6a30f09342..7a82dda805 100644 --- a/custom_components/tuya_local/devices/carro_smart_ceiling_fan_light.yaml +++ b/custom_components/tuya_local/devices/carro_smart_ceiling_fan_light.yaml @@ -25,8 +25,6 @@ primary_entity: range: min: 1 max: 10 - mapping: - - scale: 0.1 - id: 103 type: string name: direction @@ -57,8 +55,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - entity: light name: Daylight light dps: @@ -71,5 +67,3 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 diff --git a/custom_components/tuya_local/devices/casafan_ceiling_fan_light.yaml b/custom_components/tuya_local/devices/casafan_ceiling_fan_light.yaml index 2ff224a63f..6811709d8a 100644 --- a/custom_components/tuya_local/devices/casafan_ceiling_fan_light.yaml +++ b/custom_components/tuya_local/devices/casafan_ceiling_fan_light.yaml @@ -25,8 +25,6 @@ primary_entity: range: min: 1 max: 6 - mapping: - - scale: 0.06 - id: 8 type: string name: direction @@ -42,8 +40,6 @@ secondary_entities: range: min: 10 max: 100 - mapping: - - scale: 0.392 - id: 17 # 17 is listed as color_temp, and reported by the device, but light # is fixed 3000K light diff --git a/custom_components/tuya_local/devices/cct_lightbulb.yaml b/custom_components/tuya_local/devices/cct_lightbulb.yaml index 607e9f35aa..3be9d08d3a 100644 --- a/custom_components/tuya_local/devices/cct_lightbulb.yaml +++ b/custom_components/tuya_local/devices/cct_lightbulb.yaml @@ -25,8 +25,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 23 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/cecotec_fan_light.yaml b/custom_components/tuya_local/devices/cecotec_fan_light.yaml index 6d4d4bd82a..6f89d373a6 100644 --- a/custom_components/tuya_local/devices/cecotec_fan_light.yaml +++ b/custom_components/tuya_local/devices/cecotec_fan_light.yaml @@ -26,9 +26,6 @@ primary_entity: - id: 3 name: speed type: string - range: - min: 1 - max: 6 mapping: - dps_val: "1" value: 17 diff --git a/custom_components/tuya_local/devices/chanfok_fan_light.yaml b/custom_components/tuya_local/devices/chanfok_fan_light.yaml index e59f16fdc2..4d7ee242da 100644 --- a/custom_components/tuya_local/devices/chanfok_fan_light.yaml +++ b/custom_components/tuya_local/devices/chanfok_fan_light.yaml @@ -21,10 +21,8 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 6 - mapping: - - scale: 0.06 - id: 63 type: string name: direction @@ -43,8 +41,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 23 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/deta_dimmer_switch.yaml b/custom_components/tuya_local/devices/deta_dimmer_switch.yaml index 7b4b0e4e29..c05d235752 100644 --- a/custom_components/tuya_local/devices/deta_dimmer_switch.yaml +++ b/custom_components/tuya_local/devices/deta_dimmer_switch.yaml @@ -14,8 +14,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 secondary_entities: - entity: number name: Minimum brightness diff --git a/custom_components/tuya_local/devices/deta_fan.yaml b/custom_components/tuya_local/devices/deta_fan.yaml index 53d23f0d93..63e529577c 100644 --- a/custom_components/tuya_local/devices/deta_fan.yaml +++ b/custom_components/tuya_local/devices/deta_fan.yaml @@ -9,10 +9,8 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 3 - mapping: - - scale: 0.03 - id: 102 type: integer name: timer diff --git a/custom_components/tuya_local/devices/dimming_lightbulb.yaml b/custom_components/tuya_local/devices/dimming_lightbulb.yaml index 1d5818e4ab..cc7b6d53d7 100644 --- a/custom_components/tuya_local/devices/dimming_lightbulb.yaml +++ b/custom_components/tuya_local/devices/dimming_lightbulb.yaml @@ -18,8 +18,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 secondary_entities: - entity: number name: Timer diff --git a/custom_components/tuya_local/devices/djive_arc_fan.yaml b/custom_components/tuya_local/devices/djive_arc_fan.yaml index 724cbb2d1f..3715990782 100644 --- a/custom_components/tuya_local/devices/djive_arc_fan.yaml +++ b/custom_components/tuya_local/devices/djive_arc_fan.yaml @@ -27,10 +27,8 @@ primary_entity: name: speed type: integer range: - min: 0 + min: 1 max: 9 - mapping: - - scale: 0.09 - id: 5 type: boolean name: oscillate diff --git a/custom_components/tuya_local/devices/dreamlight_led_strip.yaml b/custom_components/tuya_local/devices/dreamlight_led_strip.yaml index ef7399d28c..0cd06bf1d8 100644 --- a/custom_components/tuya_local/devices/dreamlight_led_strip.yaml +++ b/custom_components/tuya_local/devices/dreamlight_led_strip.yaml @@ -30,7 +30,6 @@ primary_entity: mapping: - dps_val: null value: 0 - - scale: 3.92 - id: 23 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/fanco_ecosilentdeluxe.yaml b/custom_components/tuya_local/devices/fanco_ecosilentdeluxe.yaml index 40fd6dee7c..053c388890 100644 --- a/custom_components/tuya_local/devices/fanco_ecosilentdeluxe.yaml +++ b/custom_components/tuya_local/devices/fanco_ecosilentdeluxe.yaml @@ -12,10 +12,8 @@ primary_entity: name: speed type: integer range: - min: 0 + min: 1 max: 6 - mapping: - - scale: 0.06 - id: 8 name: direction type: string @@ -31,8 +29,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 17 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/feit_dimmer.yaml b/custom_components/tuya_local/devices/feit_dimmer.yaml index ebde919434..9fe947d49a 100644 --- a/custom_components/tuya_local/devices/feit_dimmer.yaml +++ b/custom_components/tuya_local/devices/feit_dimmer.yaml @@ -18,8 +18,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 3 # advisory only, the integration does not actually use this, setting it # does not seem to work, so probably determined by bulb type diff --git a/custom_components/tuya_local/devices/galaxy_projector_light.yaml b/custom_components/tuya_local/devices/galaxy_projector_light.yaml index be4d9972be..d21c90420c 100644 --- a/custom_components/tuya_local/devices/galaxy_projector_light.yaml +++ b/custom_components/tuya_local/devices/galaxy_projector_light.yaml @@ -60,8 +60,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 51 name: effect type: string diff --git a/custom_components/tuya_local/devices/ge_jasco_ultra_pro_toggle_dimmer_v2.yaml b/custom_components/tuya_local/devices/ge_jasco_ultra_pro_toggle_dimmer_v2.yaml index 46faa87cf4..61ded12c5d 100644 --- a/custom_components/tuya_local/devices/ge_jasco_ultra_pro_toggle_dimmer_v2.yaml +++ b/custom_components/tuya_local/devices/ge_jasco_ultra_pro_toggle_dimmer_v2.yaml @@ -17,8 +17,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 secondary_entities: - entity: select name: Bulb Type diff --git a/custom_components/tuya_local/devices/goldair_101cm_tower_fan.yaml b/custom_components/tuya_local/devices/goldair_101cm_tower_fan.yaml index 008f0c8434..cec0bdf4a1 100644 --- a/custom_components/tuya_local/devices/goldair_101cm_tower_fan.yaml +++ b/custom_components/tuya_local/devices/goldair_101cm_tower_fan.yaml @@ -23,10 +23,8 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 3 - mapping: - - scale: 0.03 - id: 5 type: boolean name: oscillate diff --git a/custom_components/tuya_local/devices/goldair_fan.yaml b/custom_components/tuya_local/devices/goldair_fan.yaml index 7c72608730..ee72f288a6 100644 --- a/custom_components/tuya_local/devices/goldair_fan.yaml +++ b/custom_components/tuya_local/devices/goldair_fan.yaml @@ -11,11 +11,10 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 12 mapping: - - scale: 0.12 - constraint: preset_mode + - constraint: preset_mode conditions: - dps_val: nature step: 4 diff --git a/custom_components/tuya_local/devices/goldair_platinum_tower_fan.yaml b/custom_components/tuya_local/devices/goldair_platinum_tower_fan.yaml index 4ee4e9d8f5..6a5c160986 100644 --- a/custom_components/tuya_local/devices/goldair_platinum_tower_fan.yaml +++ b/custom_components/tuya_local/devices/goldair_platinum_tower_fan.yaml @@ -25,10 +25,8 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 3 - mapping: - - scale: 0.03 - id: 4 type: string name: oscillate diff --git a/custom_components/tuya_local/devices/hdmi_sync_light.yaml b/custom_components/tuya_local/devices/hdmi_sync_light.yaml index 43fddb4680..812fbf98a1 100644 --- a/custom_components/tuya_local/devices/hdmi_sync_light.yaml +++ b/custom_components/tuya_local/devices/hdmi_sync_light.yaml @@ -25,8 +25,6 @@ primary_entity: range: min: 0 max: 1000 - mapping: - - scale: 3.92 - id: 24 type: hex name: rgbhsv diff --git a/custom_components/tuya_local/devices/immax_neo_light_vento.yaml b/custom_components/tuya_local/devices/immax_neo_light_vento.yaml index af2c995989..d48e3047b9 100644 --- a/custom_components/tuya_local/devices/immax_neo_light_vento.yaml +++ b/custom_components/tuya_local/devices/immax_neo_light_vento.yaml @@ -25,11 +25,10 @@ primary_entity: type: integer category: config range: - min: 0 + min: 1 max: 6 mapping: - - scale: 0.06 - constraint: preset_mode + - constraint: preset_mode conditions: - dps_val: nature step: 5 diff --git a/custom_components/tuya_local/devices/ledkia_fan_light.yaml b/custom_components/tuya_local/devices/ledkia_fan_light.yaml index a59fa13c79..a55f4c45db 100644 --- a/custom_components/tuya_local/devices/ledkia_fan_light.yaml +++ b/custom_components/tuya_local/devices/ledkia_fan_light.yaml @@ -13,10 +13,8 @@ primary_entity: name: speed optional: true range: - min: 0 + min: 1 max: 6 - mapping: - - scale: 0.06 - id: 63 type: string name: direction @@ -38,8 +36,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 23 type: integer name: color_temp diff --git a/custom_components/tuya_local/devices/lexy_f501_fan.yaml b/custom_components/tuya_local/devices/lexy_f501_fan.yaml index b5b232cdba..0015ca9c0f 100644 --- a/custom_components/tuya_local/devices/lexy_f501_fan.yaml +++ b/custom_components/tuya_local/devices/lexy_f501_fan.yaml @@ -43,10 +43,8 @@ primary_entity: name: speed type: integer range: - min: 0 + min: 1 max: 15 - mapping: - - scale: 0.15 secondary_entities: - entity: light category: config diff --git a/custom_components/tuya_local/devices/loycco_sound_nightlight.yaml b/custom_components/tuya_local/devices/loycco_sound_nightlight.yaml index 758c423a3d..3ef197adc5 100644 --- a/custom_components/tuya_local/devices/loycco_sound_nightlight.yaml +++ b/custom_components/tuya_local/devices/loycco_sound_nightlight.yaml @@ -31,8 +31,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 5 name: rgbhsv type: hex diff --git a/custom_components/tuya_local/devices/lytmi_hdmisync_backlight.yaml b/custom_components/tuya_local/devices/lytmi_hdmisync_backlight.yaml index 9d4b2533ef..af6fe7b965 100644 --- a/custom_components/tuya_local/devices/lytmi_hdmisync_backlight.yaml +++ b/custom_components/tuya_local/devices/lytmi_hdmisync_backlight.yaml @@ -16,8 +16,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 24 name: rgbhsv type: hex diff --git a/custom_components/tuya_local/devices/mantra_fan.yaml b/custom_components/tuya_local/devices/mantra_fan.yaml index 9093f9cc23..3972291c98 100644 --- a/custom_components/tuya_local/devices/mantra_fan.yaml +++ b/custom_components/tuya_local/devices/mantra_fan.yaml @@ -129,8 +129,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 11 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/marpou_ceiling_lamp_ledlight.yaml b/custom_components/tuya_local/devices/marpou_ceiling_lamp_ledlight.yaml index 42292bf182..2b9590d29f 100644 --- a/custom_components/tuya_local/devices/marpou_ceiling_lamp_ledlight.yaml +++ b/custom_components/tuya_local/devices/marpou_ceiling_lamp_ledlight.yaml @@ -31,7 +31,6 @@ primary_entity: mapping: - dps_val: null value: 0 - - scale: 3.92 - id: 23 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/modernflames_orion_fireplace.yaml b/custom_components/tuya_local/devices/modernflames_orion_fireplace.yaml index e19cdf0fd9..504aee193a 100644 --- a/custom_components/tuya_local/devices/modernflames_orion_fireplace.yaml +++ b/custom_components/tuya_local/devices/modernflames_orion_fireplace.yaml @@ -280,8 +280,6 @@ secondary_entities: range: min: 0 max: 100 - mapping: - - scale: 0.392 - id: 109 name: effect type: string diff --git a/custom_components/tuya_local/devices/moes_dimmer.yaml b/custom_components/tuya_local/devices/moes_dimmer.yaml index 9a43d6b4e7..2d63f9bef8 100644 --- a/custom_components/tuya_local/devices/moes_dimmer.yaml +++ b/custom_components/tuya_local/devices/moes_dimmer.yaml @@ -11,8 +11,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 13 name: work_mode type: string diff --git a/custom_components/tuya_local/devices/moes_star_projector.yaml b/custom_components/tuya_local/devices/moes_star_projector.yaml index 00a4b5475e..f7fd5fb880 100644 --- a/custom_components/tuya_local/devices/moes_star_projector.yaml +++ b/custom_components/tuya_local/devices/moes_star_projector.yaml @@ -56,8 +56,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - entity: number name: Star rotation speed category: config diff --git a/custom_components/tuya_local/devices/moesgo_dimmer.yaml b/custom_components/tuya_local/devices/moesgo_dimmer.yaml index f378dc4206..639468b555 100644 --- a/custom_components/tuya_local/devices/moesgo_dimmer.yaml +++ b/custom_components/tuya_local/devices/moesgo_dimmer.yaml @@ -14,8 +14,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 secondary_entities: - entity: number name: Minimum brightness diff --git a/custom_components/tuya_local/devices/momcozy_white_noise_machine.yaml b/custom_components/tuya_local/devices/momcozy_white_noise_machine.yaml index 78d81bead9..07c978ca58 100644 --- a/custom_components/tuya_local/devices/momcozy_white_noise_machine.yaml +++ b/custom_components/tuya_local/devices/momcozy_white_noise_machine.yaml @@ -27,8 +27,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 5 name: rgbhsv type: hex diff --git a/custom_components/tuya_local/devices/momcozy_white_noise_machine_v2.yaml b/custom_components/tuya_local/devices/momcozy_white_noise_machine_v2.yaml index 1851d351e5..2fca2e952a 100644 --- a/custom_components/tuya_local/devices/momcozy_white_noise_machine_v2.yaml +++ b/custom_components/tuya_local/devices/momcozy_white_noise_machine_v2.yaml @@ -27,8 +27,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 5 name: rgbhsv type: hex diff --git a/custom_components/tuya_local/devices/mrc_magnum_floorheater.yaml b/custom_components/tuya_local/devices/mrc_magnum_floorheater.yaml index 37e2f36868..be90ac6e14 100644 --- a/custom_components/tuya_local/devices/mrc_magnum_floorheater.yaml +++ b/custom_components/tuya_local/devices/mrc_magnum_floorheater.yaml @@ -320,8 +320,6 @@ secondary_entities: range: min: 1 max: 10 - mapping: - - scale: 0.0392 - entity: number name: Display timeout icon: "mdi:television-ambient-light" diff --git a/custom_components/tuya_local/devices/ovlaim_ceiling_fan_light.yaml b/custom_components/tuya_local/devices/ovlaim_ceiling_fan_light.yaml index bc74e20a31..2d122850bf 100644 --- a/custom_components/tuya_local/devices/ovlaim_ceiling_fan_light.yaml +++ b/custom_components/tuya_local/devices/ovlaim_ceiling_fan_light.yaml @@ -50,8 +50,6 @@ secondary_entities: range: min: 0 max: 100 - mapping: - - scale: 0.392 - id: 17 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/pir_rgbcw_light.yaml b/custom_components/tuya_local/devices/pir_rgbcw_light.yaml index a430469234..134a66c7c1 100644 --- a/custom_components/tuya_local/devices/pir_rgbcw_light.yaml +++ b/custom_components/tuya_local/devices/pir_rgbcw_light.yaml @@ -25,8 +25,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 23 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/pir_spotlight.yaml b/custom_components/tuya_local/devices/pir_spotlight.yaml index 46046e78f1..d4987057d8 100644 --- a/custom_components/tuya_local/devices/pir_spotlight.yaml +++ b/custom_components/tuya_local/devices/pir_spotlight.yaml @@ -19,8 +19,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 23 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/reiga_52_fan_light.yaml b/custom_components/tuya_local/devices/reiga_52_fan_light.yaml index 7c19816573..bd87b2267c 100644 --- a/custom_components/tuya_local/devices/reiga_52_fan_light.yaml +++ b/custom_components/tuya_local/devices/reiga_52_fan_light.yaml @@ -25,8 +25,6 @@ primary_entity: range: min: 1 max: 6 - mapping: - - scale: 0.06 - id: 8 type: string name: direction diff --git a/custom_components/tuya_local/devices/rgbcw_lightbulb.yaml b/custom_components/tuya_local/devices/rgbcw_lightbulb.yaml index 1cefa2c897..793f1517d2 100644 --- a/custom_components/tuya_local/devices/rgbcw_lightbulb.yaml +++ b/custom_components/tuya_local/devices/rgbcw_lightbulb.yaml @@ -38,7 +38,6 @@ primary_entity: mapping: - dps_val: null value: 0 - - scale: 3.92 - id: 23 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/rgbw_lightbulbv2.yaml b/custom_components/tuya_local/devices/rgbw_lightbulbv2.yaml index 7c9277c052..ab352d8ea6 100644 --- a/custom_components/tuya_local/devices/rgbw_lightbulbv2.yaml +++ b/custom_components/tuya_local/devices/rgbw_lightbulbv2.yaml @@ -25,8 +25,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 24 name: rgbhsv type: hex diff --git a/custom_components/tuya_local/devices/simple_rgbcw_lightbulb.yaml b/custom_components/tuya_local/devices/simple_rgbcw_lightbulb.yaml index c2d5677aff..8139e6b092 100644 --- a/custom_components/tuya_local/devices/simple_rgbcw_lightbulb.yaml +++ b/custom_components/tuya_local/devices/simple_rgbcw_lightbulb.yaml @@ -19,8 +19,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 23 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/skyfan_dc_fan.yaml b/custom_components/tuya_local/devices/skyfan_dc_fan.yaml index 526c3ce638..7e64cd48ab 100644 --- a/custom_components/tuya_local/devices/skyfan_dc_fan.yaml +++ b/custom_components/tuya_local/devices/skyfan_dc_fan.yaml @@ -22,10 +22,8 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 5 - mapping: - - scale: 0.05 - id: 8 type: string name: direction diff --git a/custom_components/tuya_local/devices/skyfan_fan_light.yaml b/custom_components/tuya_local/devices/skyfan_fan_light.yaml index ed639e9097..2c38ef43f9 100644 --- a/custom_components/tuya_local/devices/skyfan_fan_light.yaml +++ b/custom_components/tuya_local/devices/skyfan_fan_light.yaml @@ -23,10 +23,8 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 5 - mapping: - - scale: 0.05 - id: 8 type: string name: direction @@ -42,8 +40,6 @@ secondary_entities: range: min: 1 max: 5 - mapping: - - scale: 0.0196 - id: 19 name: color_temp type: string diff --git a/custom_components/tuya_local/devices/smart_led_strip.yaml b/custom_components/tuya_local/devices/smart_led_strip.yaml index 9c8f9340d1..5d091efdf6 100644 --- a/custom_components/tuya_local/devices/smart_led_strip.yaml +++ b/custom_components/tuya_local/devices/smart_led_strip.yaml @@ -30,7 +30,6 @@ primary_entity: mapping: - dps_val: null value: 0 - - scale: 3.92 - id: 23 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/soleusair_air_purifier.yaml b/custom_components/tuya_local/devices/soleusair_air_purifier.yaml index 36e9bc7146..fb4825ac80 100644 --- a/custom_components/tuya_local/devices/soleusair_air_purifier.yaml +++ b/custom_components/tuya_local/devices/soleusair_air_purifier.yaml @@ -18,8 +18,6 @@ primary_entity: range: min: 1 max: 5 - mapping: - - scale: 0.05 - id: 3 name: preset_mode type: string diff --git a/custom_components/tuya_local/devices/space_dog_music_lamp.yaml b/custom_components/tuya_local/devices/space_dog_music_lamp.yaml index 5859ad032e..6a1b8bd766 100644 --- a/custom_components/tuya_local/devices/space_dog_music_lamp.yaml +++ b/custom_components/tuya_local/devices/space_dog_music_lamp.yaml @@ -29,8 +29,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 # Color # sample values: 00f003e803e8, 00b403e803e8, 000003e803e8, 00f003e803e8 diff --git a/custom_components/tuya_local/devices/stirling_fs140dc_fan.yaml b/custom_components/tuya_local/devices/stirling_fs140dc_fan.yaml index 0b4b3480eb..70c4e1cce6 100644 --- a/custom_components/tuya_local/devices/stirling_fs140dc_fan.yaml +++ b/custom_components/tuya_local/devices/stirling_fs140dc_fan.yaml @@ -20,10 +20,8 @@ primary_entity: name: speed type: integer range: - min: 0 + min: 1 max: 15 - mapping: - - scale: 0.15 - id: 5 name: oscillate type: boolean diff --git a/custom_components/tuya_local/devices/sulion_ceiling_fan.yaml b/custom_components/tuya_local/devices/sulion_ceiling_fan.yaml index 98e66a8bc0..700de293d5 100644 --- a/custom_components/tuya_local/devices/sulion_ceiling_fan.yaml +++ b/custom_components/tuya_local/devices/sulion_ceiling_fan.yaml @@ -12,8 +12,6 @@ primary_entity: range: min: 1 max: 6 - mapping: - - scale: 0.06 - id: 54 type: string name: direction diff --git a/custom_components/tuya_local/devices/t5e_wf_thermostat.yaml b/custom_components/tuya_local/devices/t5e_wf_thermostat.yaml index 3e781145cc..1c30ed77cd 100644 --- a/custom_components/tuya_local/devices/t5e_wf_thermostat.yaml +++ b/custom_components/tuya_local/devices/t5e_wf_thermostat.yaml @@ -380,7 +380,6 @@ secondary_entities: max: 100 mapping: - step: 10 - scale: 0.392 - entity: binary_sensor name: Fault category: diagnostic diff --git a/custom_components/tuya_local/devices/tampa_led_system.yaml b/custom_components/tuya_local/devices/tampa_led_system.yaml index 1897623b83..ca7e3c3f8e 100644 --- a/custom_components/tuya_local/devices/tampa_led_system.yaml +++ b/custom_components/tuya_local/devices/tampa_led_system.yaml @@ -17,8 +17,6 @@ primary_entity: range: min: 0 max: 1000 - mapping: - - scale: 3.92 - id: 4 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/tesla_air_purifier_pro.yaml b/custom_components/tuya_local/devices/tesla_air_purifier_pro.yaml index 331ee77fb1..355437960c 100644 --- a/custom_components/tuya_local/devices/tesla_air_purifier_pro.yaml +++ b/custom_components/tuya_local/devices/tesla_air_purifier_pro.yaml @@ -23,13 +23,13 @@ primary_entity: type: string mapping: - dps_val: "sleep" - value: "sleep" + value: 25 - dps_val: "low" - value: "low" + value: 50 - dps_val: "mid" - value: "mid" + value: 75 - dps_val: "high" - value: "high" + value: 100 secondary_entities: - entity: light category: config diff --git a/custom_components/tuya_local/devices/tmwf02_fan.yaml b/custom_components/tuya_local/devices/tmwf02_fan.yaml index 9b4a277ed5..6598825432 100644 --- a/custom_components/tuya_local/devices/tmwf02_fan.yaml +++ b/custom_components/tuya_local/devices/tmwf02_fan.yaml @@ -12,7 +12,7 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 100 secondary_entities: - entity: number diff --git a/custom_components/tuya_local/devices/treatlife_ds03_fan_light.yaml b/custom_components/tuya_local/devices/treatlife_ds03_fan_light.yaml index dc0f239a5b..6dfbecb03c 100644 --- a/custom_components/tuya_local/devices/treatlife_ds03_fan_light.yaml +++ b/custom_components/tuya_local/devices/treatlife_ds03_fan_light.yaml @@ -48,5 +48,4 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 + diff --git a/custom_components/tuya_local/devices/treatlife_dual_plugin_dimmer.yaml b/custom_components/tuya_local/devices/treatlife_dual_plugin_dimmer.yaml index 4d4a42b3f3..a3677f26d8 100644 --- a/custom_components/tuya_local/devices/treatlife_dual_plugin_dimmer.yaml +++ b/custom_components/tuya_local/devices/treatlife_dual_plugin_dimmer.yaml @@ -16,8 +16,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 3 name: min_brightness type: integer @@ -46,8 +44,6 @@ secondary_entities: range: min: 0 max: 1000 - mapping: - - scale: 3.92 - id: 9 name: min_brightness type: integer diff --git a/custom_components/tuya_local/devices/tv_backlights.yaml b/custom_components/tuya_local/devices/tv_backlights.yaml index 0097d862ab..574c4dd0b0 100644 --- a/custom_components/tuya_local/devices/tv_backlights.yaml +++ b/custom_components/tuya_local/devices/tv_backlights.yaml @@ -17,8 +17,7 @@ primary_entity: min: 0 max: 100 mapping: - - scale: 0.392 - constraint: video_mode + - constraint: video_mode conditions: - dps_val: ambi_mode value_redirect: scene_brightness @@ -31,8 +30,6 @@ primary_entity: range: min: 0 max: 100 - mapping: - - scale: 0.392 - id: 112 hidden: true name: color_brightness @@ -40,8 +37,6 @@ primary_entity: range: min: 0 max: 100 - mapping: - - scale: 0.392 - id: 111 name: rgbhsv type: hex diff --git a/custom_components/tuya_local/devices/ustellar_ut99911_rgb.yaml b/custom_components/tuya_local/devices/ustellar_ut99911_rgb.yaml index fe34bb656f..3bb7e0ac34 100644 --- a/custom_components/tuya_local/devices/ustellar_ut99911_rgb.yaml +++ b/custom_components/tuya_local/devices/ustellar_ut99911_rgb.yaml @@ -16,8 +16,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 23 type: integer name: color_temp diff --git a/custom_components/tuya_local/devices/wf39m_dimmer_smartplug.yaml b/custom_components/tuya_local/devices/wf39m_dimmer_smartplug.yaml index 41fd2d0729..2fce948bb5 100644 --- a/custom_components/tuya_local/devices/wf39m_dimmer_smartplug.yaml +++ b/custom_components/tuya_local/devices/wf39m_dimmer_smartplug.yaml @@ -14,8 +14,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 secondary_entities: - entity: select name: Light type diff --git a/custom_components/tuya_local/devices/wf520d_wifi_dual_touch_dimmer.yaml b/custom_components/tuya_local/devices/wf520d_wifi_dual_touch_dimmer.yaml index 786e005a7e..1b3dbc71fe 100644 --- a/custom_components/tuya_local/devices/wf520d_wifi_dual_touch_dimmer.yaml +++ b/custom_components/tuya_local/devices/wf520d_wifi_dual_touch_dimmer.yaml @@ -12,8 +12,6 @@ primary_entity: range: min: 10 max: 1000 - mapping: - - scale: 3.92 secondary_entities: - entity: light name: Dimmer 2 @@ -27,8 +25,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - entity: number name: Minimum brightness 1 category: config diff --git a/custom_components/tuya_local/devices/windcalm_fan.yaml b/custom_components/tuya_local/devices/windcalm_fan.yaml index 434615dfd2..4ec3d96d02 100644 --- a/custom_components/tuya_local/devices/windcalm_fan.yaml +++ b/custom_components/tuya_local/devices/windcalm_fan.yaml @@ -9,10 +9,8 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 6 - mapping: - - scale: 0.06 - id: 63 type: string name: direction diff --git a/custom_components/tuya_local/devices/windcalm_fan_with_light.yaml b/custom_components/tuya_local/devices/windcalm_fan_with_light.yaml index c01595faf2..e9e9154db2 100644 --- a/custom_components/tuya_local/devices/windcalm_fan_with_light.yaml +++ b/custom_components/tuya_local/devices/windcalm_fan_with_light.yaml @@ -9,10 +9,8 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 6 - mapping: - - scale: 0.06 - id: 63 type: string name: direction @@ -28,8 +26,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 23 name: color_temp type: integer diff --git a/custom_components/tuya_local/devices/yidi_fan_light_switch.yaml b/custom_components/tuya_local/devices/yidi_fan_light_switch.yaml index 2092de683f..a727242ee1 100644 --- a/custom_components/tuya_local/devices/yidi_fan_light_switch.yaml +++ b/custom_components/tuya_local/devices/yidi_fan_light_switch.yaml @@ -12,7 +12,7 @@ primary_entity: type: integer name: speed range: - min: 0 + min: 1 max: 100 secondary_entities: - entity: light diff --git a/custom_components/tuya_local/devices/yx316wifi_aroma_diffuser.yaml b/custom_components/tuya_local/devices/yx316wifi_aroma_diffuser.yaml index 100edaceff..28c5c775fa 100644 --- a/custom_components/tuya_local/devices/yx316wifi_aroma_diffuser.yaml +++ b/custom_components/tuya_local/devices/yx316wifi_aroma_diffuser.yaml @@ -62,8 +62,6 @@ secondary_entities: range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 10 name: rgbhsv type: hex diff --git a/custom_components/tuya_local/devices/zigbee_smart_bulb.yaml b/custom_components/tuya_local/devices/zigbee_smart_bulb.yaml index 1a0df681a6..9742ad4608 100644 --- a/custom_components/tuya_local/devices/zigbee_smart_bulb.yaml +++ b/custom_components/tuya_local/devices/zigbee_smart_bulb.yaml @@ -17,8 +17,6 @@ primary_entity: range: min: 0 max: 1000 - mapping: - - scale: 3.92 - id: 4 name: color_temp optional: true diff --git a/custom_components/tuya_local/fan.py b/custom_components/tuya_local/fan.py index d4e93bfec7..4c5c25eea0 100644 --- a/custom_components/tuya_local/fan.py +++ b/custom_components/tuya_local/fan.py @@ -5,7 +5,10 @@ from typing import Any from homeassistant.components.fan import FanEntity, FanEntityFeature - +from homeassistant.util.percentage import ( + percentage_to_ranged_value, + ranged_value_to_percentage, +) from .device import TuyaLocalDevice from .helpers.config import async_tuya_setup_platform from .helpers.device_config import TuyaEntityConfig @@ -82,6 +85,10 @@ async def async_turn_on( } if percentage is not None and self._speed_dps: + r = self._speed_dps.range(self._device) + if r: + percentage = percentage_to_ranged_value(r, percentage) + settings = { **settings, **self._speed_dps.get_values_to_set(self._device, percentage), @@ -106,7 +113,11 @@ def percentage(self): """Return the currently set percentage.""" if self._speed_dps is None: return None - return self._speed_dps.get_value(self._device) + r = self._speed_dps.range(self._device) + val = self._speed_dps.get_value(self._device) + if r: + val = ranged_value_to_percentage(r, val) + return val @property def percentage_step(self): @@ -115,7 +126,9 @@ def percentage_step(self): return None if self._speed_dps.values(self._device): return 100 / len(self._speed_dps.values(self._device)) - return self._speed_dps.step(self._device) + r = self._speed_dps.range(self._device) + scale = 100 / r[1] if r else 1.0 + return self._speed_dps.step(self._device) * scale @property def speed_count(self): @@ -140,6 +153,9 @@ async def async_set_percentage(self, percentage): self._speed_dps.values(self._device), key=lambda x: abs(x - percentage), ) + elif self._speed_dps.range(self._device): + r = self._speed_dps.range(self._device) + percentage = percentage_to_ranged_value(r, percentage) values_to_set = self._speed_dps.get_values_to_set(self._device, percentage) if not self.is_on and self._switch_dps: diff --git a/custom_components/tuya_local/helpers/device_config.py b/custom_components/tuya_local/helpers/device_config.py index d77f519a2e..3f85b91c0d 100644 --- a/custom_components/tuya_local/helpers/device_config.py +++ b/custom_components/tuya_local/helpers/device_config.py @@ -42,9 +42,7 @@ def _typematch(vtype, value): def _scale_range(r, s): "Scale range r by factor s" - if s == 1: - return r - return {"min": r["min"] / s, "max": r["max"] / s} + return (r["min"] / s, r["max"] / s) _unsigned_fmts = { @@ -923,13 +921,13 @@ def get_values_to_set(self, device, value): r = self.range(device, scaled=False) if r and isinstance(result, Number): - mn = r["min"] - mx = r["max"] + mn = r[0] + mx = r[1] if round(result) < mn or round(result) > mx: # Output scaled values in the error message r = self.range(device, scaled=True) - mn = r["min"] - mx = r["max"] + mn = r[0] + mx = r[1] raise ValueError(f"{self.name} ({value}) must be between {mn} and {mx}") if mask and isinstance(result, Number): diff --git a/custom_components/tuya_local/humidifier.py b/custom_components/tuya_local/humidifier.py index 0651ed126f..d7e5f59759 100644 --- a/custom_components/tuya_local/humidifier.py +++ b/custom_components/tuya_local/humidifier.py @@ -103,7 +103,7 @@ def min_humidity(self): if self._humidity_dp is None: return None r = self._humidity_dp.range(self._device) - return DEFAULT_MIN_HUMIDITY if r is None else r["min"] + return DEFAULT_MIN_HUMIDITY if r is None else r[0] @property def max_humidity(self): @@ -111,7 +111,7 @@ def max_humidity(self): if self._humidity_dp is None: return None r = self._humidity_dp.range(self._device) - return DEFAULT_MAX_HUMIDITY if r is None else r["max"] + return DEFAULT_MAX_HUMIDITY if r is None else r[1] async def async_set_humidity(self, humidity): if self._humidity_dp is None: diff --git a/custom_components/tuya_local/light.py b/custom_components/tuya_local/light.py index 412b2939d5..6727a3d096 100644 --- a/custom_components/tuya_local/light.py +++ b/custom_components/tuya_local/light.py @@ -150,7 +150,11 @@ def brightness(self): @property def _white_brightness(self): if self._brightness_dps: - return self._brightness_dps.get_value(self._device) + r = self._brightness_dps.range(self._device) + val = self._brightness_dps.get_value(self._device) + if r: + val = color_util.value_to_brightness(r, val) + return val @property def _unpacked_rgbhsv(self): @@ -237,6 +241,10 @@ async def async_turn_on(self, **params): "Setting brightness via WHITE parameter to %d", bright, ) + r = self._brightness_dps.range(self._device) + if r: + bright = color_util.brightness_to_value(r, bright) + settings = { **settings, **self._brightness_dps.get_values_to_set( @@ -360,6 +368,10 @@ async def async_turn_on(self, **params): ): bright = params.get(ATTR_BRIGHTNESS) _LOGGER.debug("Setting brightness to %s", bright) + r = self._brightness_dps.range(self._device) + if r: + bright = color_util.brightness_to_value(r, bright) + settings = { **settings, **self._brightness_dps.get_values_to_set( @@ -397,8 +409,13 @@ async def async_turn_on(self, **params): self._device, True ) elif self._brightness_dps and not self.is_on: + bright = 255 + r = self._brightness_dps.range(self._device) + if r: + bright = color_util.brightness_to_value(r, bright) + settings = settings | self._brightness_dps.get_values_to_set( - self._device, 255 + self._device, bright ) if settings: diff --git a/custom_components/tuya_local/number.py b/custom_components/tuya_local/number.py index 85edd2e703..ebb06ca998 100644 --- a/custom_components/tuya_local/number.py +++ b/custom_components/tuya_local/number.py @@ -71,14 +71,14 @@ def native_min_value(self): if self._min_dps is not None: return self._min_dps.get_value(self._device) r = self._value_dps.range(self._device) - return DEFAULT_MIN_VALUE if r is None else r["min"] + return DEFAULT_MIN_VALUE if r is None else r[0] @property def native_max_value(self): if self._max_dps is not None: return self._max_dps.get_value(self._device) r = self._value_dps.range(self._device) - return DEFAULT_MAX_VALUE if r is None else r["max"] + return DEFAULT_MAX_VALUE if r is None else r[1] @property def native_step(self): diff --git a/custom_components/tuya_local/water_heater.py b/custom_components/tuya_local/water_heater.py index 9a8773eca6..f19526ce99 100644 --- a/custom_components/tuya_local/water_heater.py +++ b/custom_components/tuya_local/water_heater.py @@ -214,7 +214,7 @@ def min_temp(self): if self._temperature_dps: r = self._temperature_dps.range(self._device) - return r.get("min") + return r[0] @property def max_temp(self): @@ -225,7 +225,7 @@ def max_temp(self): if self._temperature_dps: r = self._temperature_dps.range(self._device) - return r.get("max") + return r[1] async def async_turn_on(self): """ diff --git a/hacs.json b/hacs.json index 021f3ab066..f80c0e7d90 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Tuya Local", "render_readme": true, - "homeassistant": "2023.9.0" + "homeassistant": "2024.1.0" } diff --git a/tests/devices/test_arlec_fan_light.py b/tests/devices/test_arlec_fan_light.py index 120fff7a23..5425c553cd 100644 --- a/tests/devices/test_arlec_fan_light.py +++ b/tests/devices/test_arlec_fan_light.py @@ -132,7 +132,7 @@ def test_light_color_mode(self): def test_light_brightness(self): self.dps[BRIGHTNESS_DPS] = 50 - self.assertAlmostEqual(self.light.brightness, 128, 0) + self.assertAlmostEqual(self.light.brightness, 129, 0) def test_light_color_temp(self): self.dps[COLORTEMP_DPS] = 70 diff --git a/tests/devices/test_aspen_adv200_fan.py b/tests/devices/test_aspen_adv200_fan.py index 7b9766554d..8f4856937a 100644 --- a/tests/devices/test_aspen_adv200_fan.py +++ b/tests/devices/test_aspen_adv200_fan.py @@ -47,8 +47,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.climate, - min=40, - max=95, + min=40.0, + max=95.0, ) self.mark_secondary(["light_display"]) @@ -94,9 +94,9 @@ async def test_fan_set_direction_exchange(self): def test_fan_speed(self): self.dps[SPEED_DPS] = "1" - self.assertAlmostEqual(self.subject.percentage, 33.3, 1) + self.assertAlmostEqual(self.subject.percentage, 33, 0) self.dps[SPEED_DPS] = "2" - self.assertAlmostEqual(self.subject.percentage, 66.7, 1) + self.assertAlmostEqual(self.subject.percentage, 66, 0) self.dps[SPEED_DPS] = "3" self.assertEqual(self.subject.percentage, 100) diff --git a/tests/devices/test_beca_bhp6000_thermostat.py b/tests/devices/test_beca_bhp6000_thermostat.py index 9e38bf6125..48f290476a 100644 --- a/tests/devices/test_beca_bhp6000_thermostat.py +++ b/tests/devices/test_beca_bhp6000_thermostat.py @@ -34,8 +34,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=40, - max=95, + min=40.0, + max=95.0, ) self.setUpBasicLight(LIGHT_DPS, self.entities.get("light_display")) self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock")) diff --git a/tests/devices/test_betterlife_bl1500_heater.py b/tests/devices/test_betterlife_bl1500_heater.py index 2d22fa3c0e..20e91f9888 100644 --- a/tests/devices/test_betterlife_bl1500_heater.py +++ b/tests/devices/test_betterlife_bl1500_heater.py @@ -33,8 +33,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=15, - max=30, + min=15.0, + max=30.0, ) self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock")) self.setUpBasicSelect( diff --git a/tests/devices/test_deta_fan.py b/tests/devices/test_deta_fan.py index fe2fe37ad8..b0e5f4d2da 100644 --- a/tests/devices/test_deta_fan.py +++ b/tests/devices/test_deta_fan.py @@ -35,7 +35,7 @@ def test_supported_features(self): def test_speed(self): self.dps[SPEED_DPS] = "1" - self.assertAlmostEqual(self.subject.percentage, 33.3, 1) + self.assertAlmostEqual(self.subject.percentage, 33, 0) def test_speed_step(self): self.assertAlmostEqual(self.subject.percentage_step, 33.3, 1) @@ -46,7 +46,7 @@ async def test_set_speed(self): async def test_auto_stringify_speed(self): self.dps[SPEED_DPS] = "1" - self.assertAlmostEqual(self.subject.percentage, 33.3, 1) + self.assertAlmostEqual(self.subject.percentage, 33, 0) async with assert_device_properties_set(self.subject._device, {SPEED_DPS: "2"}): await self.subject.async_set_percentage(66.7) diff --git a/tests/devices/test_digoo_dgsp01_dual_nightlight_switch.py b/tests/devices/test_digoo_dgsp01_dual_nightlight_switch.py index 1f122a0e72..5d7e8d2389 100644 --- a/tests/devices/test_digoo_dgsp01_dual_nightlight_switch.py +++ b/tests/devices/test_digoo_dgsp01_dual_nightlight_switch.py @@ -43,7 +43,7 @@ def test_light_is_on(self): def test_light_brightness(self): self.dps[BRIGHTNESS_DPS] = 45 self.dps[COLORMODE_DPS] = "white" - self.assertEqual(self.light.brightness, 45) + self.assertEqual(self.light.brightness, 23) def test_light_color_mode(self): self.dps[COLORMODE_DPS] = "colour" @@ -126,7 +126,7 @@ async def test_set_brightness(self): async with assert_device_properties_set( self.light._device, { - BRIGHTNESS_DPS: 128, + BRIGHTNESS_DPS: 140, }, ): await self.light.async_turn_on(brightness=128) diff --git a/tests/devices/test_eberg_cooly_c35hd.py b/tests/devices/test_eberg_cooly_c35hd.py index 2c25710bd5..5a8fc6ad2b 100644 --- a/tests/devices/test_eberg_cooly_c35hd.py +++ b/tests/devices/test_eberg_cooly_c35hd.py @@ -41,8 +41,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=13, - max=32, + min=13.0, + max=32.0, ) self.setUpBasicSelect( UNIT_DPS, diff --git a/tests/devices/test_eberg_qubo_q40hd_heatpump.py b/tests/devices/test_eberg_qubo_q40hd_heatpump.py index 9c23e362cd..b90cdf1d3d 100644 --- a/tests/devices/test_eberg_qubo_q40hd_heatpump.py +++ b/tests/devices/test_eberg_qubo_q40hd_heatpump.py @@ -41,8 +41,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=17, - max=30, + min=17.0, + max=30.0, ) self.setUpBasicNumber( TIMER_DPS, diff --git a/tests/devices/test_eurom_600_heater.py b/tests/devices/test_eurom_600_heater.py index c2c6ecac2f..fdcddfa55c 100644 --- a/tests/devices/test_eurom_600_heater.py +++ b/tests/devices/test_eurom_600_heater.py @@ -25,8 +25,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=0, - max=37, + min=0.0, + max=37.0, ) self.setUpBasicBinarySensor( ERROR_DPS, diff --git a/tests/devices/test_eurom_600v2_heater.py b/tests/devices/test_eurom_600v2_heater.py index 8af009632e..12682deb4e 100644 --- a/tests/devices/test_eurom_600v2_heater.py +++ b/tests/devices/test_eurom_600v2_heater.py @@ -14,7 +14,7 @@ ERROR_DPS = "7" -class TestEurom600Heater( +class TestEurom600v2Heater( BasicBinarySensorTests, TargetTemperatureTests, TuyaDeviceTestCase ): __test__ = True @@ -25,8 +25,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=0, - max=37, + min=0.0, + max=37.0, ) self.setUpBasicBinarySensor( ERROR_DPS, diff --git a/tests/devices/test_eurom_601_heater.py b/tests/devices/test_eurom_601_heater.py index 6dfa60c2dd..89b041d3e3 100644 --- a/tests/devices/test_eurom_601_heater.py +++ b/tests/devices/test_eurom_601_heater.py @@ -31,8 +31,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=0, - max=37, + min=0.0, + max=37.0, ) self.setUpBasicBinarySensor( ERROR_DPS, diff --git a/tests/devices/test_fersk_vind_2_climate.py b/tests/devices/test_fersk_vind_2_climate.py index c0f7afd8b9..6e56d2d751 100644 --- a/tests/devices/test_fersk_vind_2_climate.py +++ b/tests/devices/test_fersk_vind_2_climate.py @@ -36,8 +36,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=16, - max=32, + min=16.0, + max=32.0, ) def test_supported_features(self): diff --git a/tests/devices/test_goldair_geco_heater.py b/tests/devices/test_goldair_geco_heater.py index 5f899a037e..dbfcb2395b 100644 --- a/tests/devices/test_goldair_geco_heater.py +++ b/tests/devices/test_goldair_geco_heater.py @@ -33,8 +33,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=15, - max=35, + min=15.0, + max=35.0, ) self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock")) self.setUpBasicNumber( diff --git a/tests/devices/test_goldair_gpph_heater.py b/tests/devices/test_goldair_gpph_heater.py index ff278a0c67..5eb1903528 100644 --- a/tests/devices/test_goldair_gpph_heater.py +++ b/tests/devices/test_goldair_gpph_heater.py @@ -49,8 +49,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=5, - max=35, + min=5.0, + max=35.0, ) self.setUpBasicLight(LIGHT_DPS, self.entities.get("light_display")) self.setUpBasicLock(LOCK_DPS, self.entities.get("lock_child_lock")) @@ -129,23 +129,23 @@ def test_target_temperature_in_eco_and_af_modes(self): def test_minimum_temperature(self): self.dps[PRESET_DPS] = "C" - self.assertEqual(self.subject.min_temp, 5) + self.assertEqual(self.subject.min_temp, 5.0) self.dps[PRESET_DPS] = "ECO" - self.assertEqual(self.subject.min_temp, 5) + self.assertEqual(self.subject.min_temp, 5.0) self.dps[PRESET_DPS] = "AF" - self.assertIs(self.subject.min_temp, 5) + self.assertEqual(self.subject.min_temp, 5.0) def test_maximum_target_temperature(self): self.dps[PRESET_DPS] = "C" - self.assertEqual(self.subject.max_temp, 35) + self.assertEqual(self.subject.max_temp, 35.0) self.dps[PRESET_DPS] = "ECO" - self.assertEqual(self.subject.max_temp, 21) + self.assertEqual(self.subject.max_temp, 21.0) self.dps[PRESET_DPS] = "AF" - self.assertIs(self.subject.max_temp, 5) + self.assertEqual(self.subject.max_temp, 5.0) async def test_legacy_set_temperature_with_preset_mode(self): async with assert_device_properties_set( @@ -179,12 +179,12 @@ async def test_set_target_temperature_fails_outside_valid_range_in_eco( self.dps[PRESET_DPS] = "ECO" with self.assertRaisesRegex( - ValueError, "eco_temperature \\(4\\) must be between 5 and 21" + ValueError, "eco_temperature \\(4\\) must be between 5.0 and 21.0" ): await self.subject.async_set_target_temperature(4) with self.assertRaisesRegex( - ValueError, "eco_temperature \\(22\\) must be between 5 and 21" + ValueError, "eco_temperature \\(22\\) must be between 5.0 and 21.0" ): await self.subject.async_set_target_temperature(22) diff --git a/tests/devices/test_hydrotherm_dynamicx8.py b/tests/devices/test_hydrotherm_dynamicx8.py index 6c982ebe63..287171d628 100644 --- a/tests/devices/test_hydrotherm_dynamicx8.py +++ b/tests/devices/test_hydrotherm_dynamicx8.py @@ -58,10 +58,10 @@ def test_current_temperature(self): self.assertEqual(self.subject.current_temperature, 55) def test_min_temp(self): - self.assertEqual(self.subject.min_temp, 15) + self.assertEqual(self.subject.min_temp, 15.0) def test_max_temp(self): - self.assertEqual(self.subject.max_temp, 75) + self.assertEqual(self.subject.max_temp, 75.0) def test_target_temperature(self): self.dps[TEMPERATURE_DP] = 61 diff --git a/tests/devices/test_immax_neo_light_vento.py b/tests/devices/test_immax_neo_light_vento.py index 7b9448911b..05872fbbc0 100644 --- a/tests/devices/test_immax_neo_light_vento.py +++ b/tests/devices/test_immax_neo_light_vento.py @@ -65,13 +65,13 @@ def test_preset_modes(self): def test_speed(self): self.dps[SPEED_DPS] = 2 - self.assertAlmostEqual(33.3, self.fan.percentage, 1) + self.assertAlmostEqual(33, self.fan.percentage, 0) self.dps[SPEED_DPS] = 3 self.assertEqual(50, self.fan.percentage) self.dps[SPEED_DPS] = 4 - self.assertAlmostEqual(66.7, self.fan.percentage, 1) + self.assertAlmostEqual(66, self.fan.percentage, 0) self.dps[SPEED_DPS] = 5 - self.assertAlmostEqual(83.3, self.fan.percentage, 1) + self.assertAlmostEqual(83, self.fan.percentage, 0) self.dps[SPEED_DPS] = 6 self.assertEqual(100, self.fan.percentage) self.dps[SPEED_DPS] = 0 diff --git a/tests/devices/test_kogan_kawfpac09ya_airconditioner.py b/tests/devices/test_kogan_kawfpac09ya_airconditioner.py index a3c0551434..c02badb1cd 100644 --- a/tests/devices/test_kogan_kawfpac09ya_airconditioner.py +++ b/tests/devices/test_kogan_kawfpac09ya_airconditioner.py @@ -29,8 +29,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=16, - max=30, + min=16.0, + max=30.0, ) def test_supported_features(self): diff --git a/tests/devices/test_moes_rgb_socket.py b/tests/devices/test_moes_rgb_socket.py index 742d1fee4c..b02c340554 100644 --- a/tests/devices/test_moes_rgb_socket.py +++ b/tests/devices/test_moes_rgb_socket.py @@ -104,7 +104,7 @@ def test_light_is_on(self): def test_light_brightness(self): self.dps[BRIGHTNESS_DPS] = 45 self.dps[MODE_DPS] = "white" - self.assertEqual(self.light.brightness, 45) + self.assertEqual(self.light.brightness, 23) self.dps[RGB_DPS] = "808000003cff80" self.dps[MODE_DPS] = "colour" self.assertEqual(self.light.brightness, 128) @@ -181,7 +181,7 @@ async def test_set_brightness(self): async with assert_device_properties_set( self.light._device, { - BRIGHTNESS_DPS: 128, + BRIGHTNESS_DPS: 140, }, ): await self.light.async_turn_on(brightness=128) diff --git a/tests/devices/test_nashone_mts700wb_thermostat.py b/tests/devices/test_nashone_mts700wb_thermostat.py index f113526991..254c59a52e 100644 --- a/tests/devices/test_nashone_mts700wb_thermostat.py +++ b/tests/devices/test_nashone_mts700wb_thermostat.py @@ -45,8 +45,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=-20, - max=105, + min=-20.0, + max=105.0, ) self.setUpBasicButton( RESET_DPS, diff --git a/tests/devices/test_nedis_htpl20f_heater.py b/tests/devices/test_nedis_htpl20f_heater.py index cfd160533b..d6d505d221 100644 --- a/tests/devices/test_nedis_htpl20f_heater.py +++ b/tests/devices/test_nedis_htpl20f_heater.py @@ -35,8 +35,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=15, - max=35, + min=15.0, + max=35.0, ) self.setUpBasicLock( LOCK_DPS, diff --git a/tests/devices/test_poolex_qline_heatpump.py b/tests/devices/test_poolex_qline_heatpump.py index 2a6f76f3ee..1256250d27 100644 --- a/tests/devices/test_poolex_qline_heatpump.py +++ b/tests/devices/test_poolex_qline_heatpump.py @@ -15,7 +15,7 @@ ERROR_DPS = "15" -class TestPoolexSilverlineHeatpump( +class TestPoolexQlineHeatpump( MultiBinarySensorTests, TargetTemperatureTests, TuyaDeviceTestCase, @@ -28,8 +28,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=8, - max=40, + min=8.0, + max=40.0, ) self.setUpMultiBinarySensors( [ diff --git a/tests/devices/test_rgbcw_lightbulb.py b/tests/devices/test_rgbcw_lightbulb.py index fda2968c4b..51c6f504f7 100644 --- a/tests/devices/test_rgbcw_lightbulb.py +++ b/tests/devices/test_rgbcw_lightbulb.py @@ -39,7 +39,7 @@ def test_is_on(self): def test_brightness(self): self.dps[BRIGHTNESS_DPS] = 500 - self.assertAlmostEqual(self.subject.brightness, 128, 0) + self.assertAlmostEqual(self.subject.brightness, 126, 0) def test_color_temp(self): self.dps[COLORTEMP_DPS] = 500 @@ -125,7 +125,7 @@ async def test_set_brightness_white(self): async with assert_device_properties_set( self.subject._device, { - BRIGHTNESS_DPS: 502, + BRIGHTNESS_DPS: 506, }, ): await self.subject.async_turn_on(brightness=128) diff --git a/tests/devices/test_stirling_fs140dc_fan.py b/tests/devices/test_stirling_fs140dc_fan.py index 1d005b6e8c..6cd13e07bc 100644 --- a/tests/devices/test_stirling_fs140dc_fan.py +++ b/tests/devices/test_stirling_fs140dc_fan.py @@ -96,7 +96,7 @@ async def test_oscillate_on(self): def test_speed(self): self.dps[SPEED_DPS] = "4" - self.assertAlmostEqual(self.subject.percentage, 26.67, 2) + self.assertAlmostEqual(self.subject.percentage, 26, 0) def test_speed_step(self): self.assertAlmostEqual(self.subject.percentage_step, 6.67, 2) diff --git a/tests/devices/test_weau_pool_heatpumpv2.py b/tests/devices/test_weau_pool_heatpumpv2.py index fd746f6d9a..b80e36cb88 100644 --- a/tests/devices/test_weau_pool_heatpumpv2.py +++ b/tests/devices/test_weau_pool_heatpumpv2.py @@ -31,8 +31,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=7, - max=60, + min=7.0, + max=60.0, ) self.setUpBasicBinarySensor( FAULT_DPS, diff --git a/tests/devices/test_wetair_wch750_heater.py b/tests/devices/test_wetair_wch750_heater.py index fd1819d90c..203d3f791e 100644 --- a/tests/devices/test_wetair_wch750_heater.py +++ b/tests/devices/test_wetair_wch750_heater.py @@ -41,8 +41,8 @@ def setUp(self): self.setUpTargetTemperature( TEMPERATURE_DPS, self.subject, - min=10, - max=35, + min=10.0, + max=35.0, ) self.setUpDimmableLight( BRIGHTNESS_DPS, diff --git a/tests/test_light.py b/tests/test_light.py index 64c1794ef4..cf8c61376b 100644 --- a/tests/test_light.py +++ b/tests/test_light.py @@ -137,9 +137,6 @@ async def test_async_turn_on_with_white_param(): "min": 10, "max": 1000, }, - "mapping": [ - {"scale": 3.92}, - ], }, { "id": "4", @@ -151,4 +148,4 @@ async def test_async_turn_on_with_white_param(): ) light = TuyaLocalLight(mock_device, config) await light.async_turn_on(white=128) - mock_device.async_set_properties.assert_called_once_with({"2": "white", "3": 502}) + mock_device.async_set_properties.assert_called_once_with({"2": "white", "3": 506}) From 6fc75f653e07a102d432bbb721b3b1fb91f91f39 Mon Sep 17 00:00:00 2001 From: Brendan Date: Wed, 7 Feb 2024 21:25:59 +0000 Subject: [PATCH 52/74] Adding support for Warme Eletrical Heater --- .../tuya_local/devices/warme_gsh_heater.yaml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 custom_components/tuya_local/devices/warme_gsh_heater.yaml diff --git a/custom_components/tuya_local/devices/warme_gsh_heater.yaml b/custom_components/tuya_local/devices/warme_gsh_heater.yaml new file mode 100644 index 0000000000..5e3bcd5339 --- /dev/null +++ b/custom_components/tuya_local/devices/warme_gsh_heater.yaml @@ -0,0 +1,38 @@ +name: Warme GSH heater +products: + - id: 8UGflCDtNYJw1dZs + name: Warme GSH heater +primary_entity: + entity: climate + dps: + - id: 1 + type: boolean + name: hvac_mode + mapping: + - dps_val: true + value: "heat" + icon: "mdi:radiator" + - dps_val: false + value: "off" + icon: "mdi:radiator-disabled" + - id: 2 + name: temperature + type: integer + precision: 0 + unit: "C" + range: + min: 12 + max: 50 + - id: 3 + name: current_temperature + type: integer + readonly: true + unit: "C" + - id: 101 + name: turn_off_screen + type: boolean + typeDefaultValue: false + - id: 102 + name: heat_mode + type: string + readonly: true From af32ac049fef5099a9e6e23b7675fa731cda6c4b Mon Sep 17 00:00:00 2001 From: Brendan Date: Thu, 8 Feb 2024 22:38:43 +0000 Subject: [PATCH 53/74] updates to configuration --- .../tuya_local/devices/warme_gsh_heater.yaml | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/custom_components/tuya_local/devices/warme_gsh_heater.yaml b/custom_components/tuya_local/devices/warme_gsh_heater.yaml index 5e3bcd5339..e00f8d688a 100644 --- a/custom_components/tuya_local/devices/warme_gsh_heater.yaml +++ b/custom_components/tuya_local/devices/warme_gsh_heater.yaml @@ -1,4 +1,4 @@ -name: Warme GSH heater +name: Heater products: - id: 8UGflCDtNYJw1dZs name: Warme GSH heater @@ -28,11 +28,21 @@ primary_entity: type: integer readonly: true unit: "C" - - id: 101 - name: turn_off_screen - type: boolean - typeDefaultValue: false - id: 102 - name: heat_mode + name: preset_mode type: string - readonly: true + mapping: + - dps_val: Comfort + value: Comfort + - dps_val: ECO + value: ECO + - dps_val: Frost + value: Frost +# Configuration as secondary_entity does not work +#secondary_entities: +# - entity: switch +# name: Turn Off Screen +# dps: +# - id: 101 +# name: turn_off_screen +# type: boolean From 32a4e2cd19aa46099ea9316507f5123578b90484 Mon Sep 17 00:00:00 2001 From: Brendan Date: Sat, 10 Feb 2024 09:49:24 +0000 Subject: [PATCH 54/74] Display on/off working --- .../tuya_local/devices/warme_gsh_heater.yaml | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/custom_components/tuya_local/devices/warme_gsh_heater.yaml b/custom_components/tuya_local/devices/warme_gsh_heater.yaml index e00f8d688a..bccc1d11a5 100644 --- a/custom_components/tuya_local/devices/warme_gsh_heater.yaml +++ b/custom_components/tuya_local/devices/warme_gsh_heater.yaml @@ -38,11 +38,15 @@ primary_entity: value: ECO - dps_val: Frost value: Frost -# Configuration as secondary_entity does not work -#secondary_entities: -# - entity: switch -# name: Turn Off Screen -# dps: -# - id: 101 -# name: turn_off_screen -# type: boolean +secondary_entities: + - entity: light + name: Display + dps: + - id: 101 + name: switch + type: boolean + mapping: + - dps_val: true + value: false + - dps_val: false + value: true From d996dfbc46e4f518306207b4cc53e42184b20de6 Mon Sep 17 00:00:00 2001 From: Brendan Date: Sat, 10 Feb 2024 10:28:50 +0000 Subject: [PATCH 55/74] Fix linting --- .../tuya_local/devices/warme_gsh_heater.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/tuya_local/devices/warme_gsh_heater.yaml b/custom_components/tuya_local/devices/warme_gsh_heater.yaml index bccc1d11a5..c9c80d3f0f 100644 --- a/custom_components/tuya_local/devices/warme_gsh_heater.yaml +++ b/custom_components/tuya_local/devices/warme_gsh_heater.yaml @@ -46,7 +46,7 @@ secondary_entities: name: switch type: boolean mapping: - - dps_val: true - value: false - - dps_val: false - value: true + - dps_val: true + value: false + - dps_val: false + value: true From ea58fafe45bc297b6430eca1af808f62f3e04fc6 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 11 Feb 2024 22:08:35 +0900 Subject: [PATCH 56/74] Note that Becasmart BAC-005 is supported by BAC-002 config. from Discussion #1465 also docs for #1623 / #1606 and a lint fix related to the #1444 changes. --- ACKNOWLEDGEMENTS.md | 5 +++-- DEVICES.md | 3 ++- .../tuya_local/devices/beca_bac002_thermostat_c.yaml | 7 ++++++- custom_components/tuya_local/fan.py | 1 + 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index eb238c27cf..1d0cf43060 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -484,6 +484,7 @@ Further device support has been made with the assistance of users. Please consid - [hrenki](https://github.com/hrenki) for assisting with support for Tesla TAF series air conditioners. - [FSJHecker](https://github.com/FSJHecker) for contributing support for CleanAir 604B humidifiers. - [sambarlick](https://github.com/sambarlick) for contributing support for Kogan bladeless fans and Y12 and Y16 air conditioners. -- [AproveIPD](https://github.com/AproveIPD) for assisting with support for Tonepie T1PRO cat litter box. +- [AproveIPD](https://github.com/AproveIPD) for assisting with support for Tonepie T1PRO cat litter boxes. - [hyperb1iss](https://github.com/hyperb1iss) for contributing a fix for lights in HA 2024.2 -- [mikekornikh](https://github.com/mikekornikh) for assisting with support for Moes IR/RF remote controller. +- [mikekornikh](https://github.com/mikekornikh) for assisting with support for Moes IR/RF remote controllers. +- [lowebb](https://github.com/lowebb) for contributing support for Wärme Designer wall panel heaters. diff --git a/DEVICES.md b/DEVICES.md index 8e4ac13629..5dcffd735b 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -48,6 +48,7 @@ - Sonnenkonig Eco 700 IR panel heater (probably also other Eco/Elegance series heaters) - Taurus Agadir Connect oil column heaters - Touchstone Sideline electric fireplace +- Wärme Designer wall panel heater - Wetair WCH-750 heater ### Air Conditioners / Heatpumps @@ -126,7 +127,7 @@ - Avatto ME81 thermostat - Avatto WT100 thermostat - Awow/Mi-heat TH213 thermostat (two variants) -- Beca BAC-002 thermostat +- Beca BAC-002 thermostat (confirmed on BAC-005 also, likely works with other BAC-00x models) - Beca BHT-002/3000 floor heating thermostat (with external temp sensor) - Beca BHP-6000 room heat pump control thermostat - Beca BHT-6000/8000 floor heating thermostat diff --git a/custom_components/tuya_local/devices/beca_bac002_thermostat_c.yaml b/custom_components/tuya_local/devices/beca_bac002_thermostat_c.yaml index 9975fced1f..a3295d7ea0 100644 --- a/custom_components/tuya_local/devices/beca_bac002_thermostat_c.yaml +++ b/custom_components/tuya_local/devices/beca_bac002_thermostat_c.yaml @@ -1,4 +1,9 @@ -name: BAC-002 thermostat external C +name: Thermostat +# this config is for external probe, deg C +# if you have a different setup, file a new device report +products: + - id: N8bUqOZ8HBQjU0K0 + name: Becasmart BAC005 primary_entity: entity: climate dps: diff --git a/custom_components/tuya_local/fan.py b/custom_components/tuya_local/fan.py index 4c5c25eea0..582465d709 100644 --- a/custom_components/tuya_local/fan.py +++ b/custom_components/tuya_local/fan.py @@ -9,6 +9,7 @@ percentage_to_ranged_value, ranged_value_to_percentage, ) + from .device import TuyaLocalDevice from .helpers.config import async_tuya_setup_platform from .helpers.device_config import TuyaEntityConfig From fda10429cdaf17e655beb7739965b203fbad6e18 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 11 Feb 2024 23:25:36 +0900 Subject: [PATCH 57/74] Add support for Meterk single phase clamp meters. Issue #1575 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + .../devices/single_phase_clamp_meter.yaml | 139 ++++++++++++++++++ 3 files changed, 141 insertions(+) create mode 100644 custom_components/tuya_local/devices/single_phase_clamp_meter.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 1d0cf43060..e29b27577d 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -488,3 +488,4 @@ Further device support has been made with the assistance of users. Please consid - [hyperb1iss](https://github.com/hyperb1iss) for contributing a fix for lights in HA 2024.2 - [mikekornikh](https://github.com/mikekornikh) for assisting with support for Moes IR/RF remote controllers. - [lowebb](https://github.com/lowebb) for contributing support for Wärme Designer wall panel heaters. +- [mmorenocab](https://github.com/mmorenocab) for assisting with support for Meterk single phase clamp meters. diff --git a/DEVICES.md b/DEVICES.md index 5dcffd735b..5ffe591697 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -317,6 +317,7 @@ - EARU SW RCB breaker - eMylo EAI-90 smart meter - MatSee Plus bidirectional two channel clamp meter +- Meterk single phase clamp meter - Parkside PG/PMW-300 solar inverter - PC311-TY 2 phase power clamp meter - PC321-TY 3 phase power clamp meter diff --git a/custom_components/tuya_local/devices/single_phase_clamp_meter.yaml b/custom_components/tuya_local/devices/single_phase_clamp_meter.yaml new file mode 100644 index 0000000000..97645dd113 --- /dev/null +++ b/custom_components/tuya_local/devices/single_phase_clamp_meter.yaml @@ -0,0 +1,139 @@ +name: Clamp meter +products: + - id: gk3jvsduy5ixzff3 + name: Meterk QS-WIFI-CT01 +primary_entity: + entity: sensor + class: energy + dps: + - id: 108 + type: integer + name: sensor + unit: kWh + class: total_increasing + mapping: + - scale: 1000 + - id: 109 + type: integer + name: today + mapping: + - scale: 1000 + - id: 104 + type: integer + name: add_ele + mapping: + - scale: 100 + - id: 112 + type: integer + name: add_today + mapping: + - scale: 100 +secondary_entities: + - entity: event + name: Real time + dps: + - id: 101 + type: string + name: event + - entity: select + name: Real time + icon: "mdi:connection" + category: config + dps: + - id: 102 + type: string + name: option + mapping: + - dps_val: ok + value: OK + - dps_val: clear + value: Clear + - dps_val: idle + value: Idle + - entity: sensor + name: Status + class: enum + category: diagnostic + dps: + - id: 103 + type: string + name: sensor + mapping: + - dps_val: close + value: close + - dps_val: monitor + value: monitor + - dps_val: working + value: working + - dps_val: warning + value: warning + - entity: sensor + class: power + dps: + - id: 105 + type: integer + name: sensor + unit: W + class: measurement + mapping: + - scale: 10 + - entity: sensor + class: current + dps: + - id: 106 + type: integer + name: sensor + unit: A + class: measurement + mapping: + - scale: 1000 + - entity: sensor + class: voltage + dps: + - id: 107 + type: integer + name: sensor + unit: V + class: measurement + mapping: + - scale: 10 + - entity: binary_sensor + name: Power warning + class: problem + category: diagnostic + dps: + - id: 110 + type: string + name: sensor + mapping: + - dps_val: normal + value: false + - dps_val: warn + value: true + - entity: number + name: Warning power level + category: config + class: power + dps: + - id: 111 + type: integer + name: value + unit: W + range: + min: 200 + max: 50000 + - entity: sensor + name: Network status + class: enum + category: diagnostic + dps: + - id: 113 + type: string + name: sensor + mapping: + - dps_val: cloud_net + value: Cloud + - dps_val: local_net + value: Local + - dps_val: no_net + value: Disconnected From 2945e46e6c4b54455ee3a67da0c37af275bd8bef Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 11 Feb 2024 23:40:58 +0900 Subject: [PATCH 58/74] lint --- .../tuya_local/devices/treatlife_ds03_fan_light.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/custom_components/tuya_local/devices/treatlife_ds03_fan_light.yaml b/custom_components/tuya_local/devices/treatlife_ds03_fan_light.yaml index 6dfbecb03c..9423a3e679 100644 --- a/custom_components/tuya_local/devices/treatlife_ds03_fan_light.yaml +++ b/custom_components/tuya_local/devices/treatlife_ds03_fan_light.yaml @@ -48,4 +48,3 @@ secondary_entities: range: min: 10 max: 1000 - From c85c3eb72e5cad4fa22a00c24c393f5f782d2bbf Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 12 Feb 2024 00:28:42 +0900 Subject: [PATCH 59/74] Caldo Up T: only support heat in hvac_mode Reportedly the hvac_mode dependent on presets does not work, so separate them to give the device simple single dp commands to follow. Adjustment to PR #1286 --- custom_components/tuya_local/devices/caldo_up_t_wifi.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/custom_components/tuya_local/devices/caldo_up_t_wifi.yaml b/custom_components/tuya_local/devices/caldo_up_t_wifi.yaml index 21217fb725..53a66811b2 100644 --- a/custom_components/tuya_local/devices/caldo_up_t_wifi.yaml +++ b/custom_components/tuya_local/devices/caldo_up_t_wifi.yaml @@ -10,13 +10,7 @@ primary_entity: name: hvac_mode mapping: - dps_val: true - constraint: preset_mode - conditions: - - dps_val: "0" - value: fan_only - - dps_val: "1" - value: heat - - value: heat + value: heat - dps_val: false value: "off" - id: 2 From 713c07a9d6e80a2705c4c176d9286b727a782286 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 12 Feb 2024 00:53:01 +0900 Subject: [PATCH 60/74] Dual clamp meter: support usse with a single clamp. Issue #1604 --- custom_components/tuya_local/devices/tuya_energy_meter.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/tuya_energy_meter.yaml b/custom_components/tuya_local/devices/tuya_energy_meter.yaml index c2afc6322e..e40fe13657 100644 --- a/custom_components/tuya_local/devices/tuya_energy_meter.yaml +++ b/custom_components/tuya_local/devices/tuya_energy_meter.yaml @@ -1,4 +1,4 @@ -name: Energy meter +name: Dual energy meter products: - id: 79a7z01v3n35kytb name: V-WIFI-DL02-ES @@ -141,6 +141,7 @@ secondary_entities: type: integer unit: kWh class: total_increasing + optional: true mapping: - scale: 1000 - entity: sensor From 758357a7a79cb73f72c5258cf7e9bd5431493992 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 12 Feb 2024 12:19:23 +0900 Subject: [PATCH 61/74] BHT-002 GALW: make some dps optional for GBLW compatibility Missing factory reset (button, so likely write-only) and hvac_action (maybe only because it is off in the log). Two additional dps: 102: 500 and 101: 10, but no info on what they are. Issue #1593 --- .../tuya_local/devices/bht002_galw_thermostat.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/custom_components/tuya_local/devices/bht002_galw_thermostat.yaml b/custom_components/tuya_local/devices/bht002_galw_thermostat.yaml index 775c5b9a54..17ca047f47 100644 --- a/custom_components/tuya_local/devices/bht002_galw_thermostat.yaml +++ b/custom_components/tuya_local/devices/bht002_galw_thermostat.yaml @@ -1,4 +1,7 @@ name: Thermostat +products: + - id: v5214objiaepcaer + name: BHT-002 GBLW primary_entity: entity: climate dps: @@ -21,6 +24,7 @@ primary_entity: - id: 3 name: hvac_action type: boolean + optional: true mapping: - constraint: hvac_mode conditions: @@ -32,6 +36,8 @@ primary_entity: value: idle - dps_val: true value: heating + - dps_val: null + value: idle - id: 16 name: temperature type: integer @@ -60,6 +66,7 @@ secondary_entities: dps: - id: 39 type: boolean + optional: true name: button - entity: switch name: Window detect From 31ec7b229b42aec9c6193eeb11c8191481019a9f Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 12 Feb 2024 13:26:57 +0900 Subject: [PATCH 62/74] Add support for Tesla Smart XL dehumidifier Issue #1600 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 7 +- .../devices/tesla_xl_dehumidifier.yaml | 87 +++++++++++++++++++ 3 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 custom_components/tuya_local/devices/tesla_xl_dehumidifier.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index e29b27577d..ade468326f 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -489,3 +489,4 @@ Further device support has been made with the assistance of users. Please consid - [mikekornikh](https://github.com/mikekornikh) for assisting with support for Moes IR/RF remote controllers. - [lowebb](https://github.com/lowebb) for contributing support for Wärme Designer wall panel heaters. - [mmorenocab](https://github.com/mmorenocab) for assisting with support for Meterk single phase clamp meters. +- [KoKolaj](https://github.com/KoKolaj) for assisting with support for Tesla Smart XL dehumidifiers. diff --git a/DEVICES.md b/DEVICES.md index 5ffe591697..59bea1c7ee 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -83,7 +83,7 @@ - Star-Light air conditioner (also confirmed to work with Polar branded devices) - Suntec Wellness Coolfixx portable air conditioner - Tadiran Wind 65/3P -- Tesla TAF series air conditioner +- Tesla Smart TAF series air conditioner - TroniTechnik Hellnar Klimagerät - Trotec PAC-W 2600 SH heatpump - Vivax Cool ACP-12CH35REWI @@ -224,7 +224,7 @@ - Smartmi E1 air purifier - Soleusair A02 and A10 air purifiers - Stadler Form Roger air purifier -- Tesla Pro and Mini air purifiers +- Tesla Smart Pro and Mini air purifiers - Vork VK6067AW air purifier ### Dehumidifiers @@ -262,6 +262,7 @@ - Kogan SmarterHome 7L desiccant dehumidifier - Pro Breeze 30L dehumidifier - Shinco 30D dehumidifier (also matches Klarstein DryFy Connect) +- Tesla Smart XL dehumidifier - VacPlus dehumidifier - Vivosun DE0003 dehumidifier @@ -287,7 +288,7 @@ - Cadance ultrasonic aroma diffuser with light and music playback - Ditua DT-1522-YN aroma diffuser - Etersky aroma diffuser with light -- Tesla aroma diffuser with light +- Tesla Smart aroma diffuser with light - YX316WIFI aroma diffuser - YYM-805SW aroma diffuser with light (also supports GX Aroma diffuser) diff --git a/custom_components/tuya_local/devices/tesla_xl_dehumidifier.yaml b/custom_components/tuya_local/devices/tesla_xl_dehumidifier.yaml new file mode 100644 index 0000000000..8f278cf999 --- /dev/null +++ b/custom_components/tuya_local/devices/tesla_xl_dehumidifier.yaml @@ -0,0 +1,87 @@ +name: Dehumidifier +products: + - id: 4o6u7vjbiqm9byms + name: Tesla Smart XL +primary_entity: + entity: humidifier + class: dehumidifier + dps: + - id: 1 + type: boolean + name: switch + - id: 2 + type: integer + name: humidity + range: + min: 20 + max: 80 + mapping: + - step: 20 + - id: 6 + type: integer + name: current_humidity +secondary_entities: + - entity: fan + dps: + - id: 1 + type: boolean + name: switch + - id: 4 + type: string + name: speed + mapping: + - dps_val: Sleep + value: 33 + - dps_val: Low + value: 66 + - dps_val: High + value: 100 + - entity: lock + name: Child lock + icon: "mdi:hand-back-right-off" + category: config + dps: + - id: 16 + type: boolean + name: lock + - entity: select + name: Timer + icon: "mdi:timer" + category: config + dps: + - id: 17 + type: string + name: option + mapping: + - dps_val: cancel + value: "Off" + - dps_val: "2h" + value: "2 hours" + - dps_val: "4h" + value: "4 hours" + - dps_val: "8h" + value: "8 hours" + - entity: sensor + name: Time remaining + class: duration + category: diagnostic + dps: + - id: 18 + type: integer + name: sensor + unit: min + - entity: binary_sensor + name: Fault + class: problem + category: diagnostic + dps: + - id: 19 + type: bitfield + name: sensor + mapping: + - dps_val: 0 + value: false + - value: true + - id: 19 + type: bitfield + name: fault_code From 6c38425a0e58ce09d5d75d777395b1ab7284d0eb Mon Sep 17 00:00:00 2001 From: Rodney Nissen Date: Tue, 28 Mar 2023 07:54:26 -0400 Subject: [PATCH 63/74] Adding Initial config file for Leo's Loo too --- .../tuya_local/devices/leos_loo_too.yaml | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 custom_components/tuya_local/devices/leos_loo_too.yaml diff --git a/custom_components/tuya_local/devices/leos_loo_too.yaml b/custom_components/tuya_local/devices/leos_loo_too.yaml new file mode 100644 index 0000000000..86c62d6165 --- /dev/null +++ b/custom_components/tuya_local/devices/leos_loo_too.yaml @@ -0,0 +1,61 @@ +name: Leo’s Loo Too +products: + - id: 1badzyvwh1e1hrog +primary_entity: + entity: switch + name: Power + dps: + - id: 1 + name: switch + type: boolean +secondary_entities: + - entity: select + category: config + name: Cleaning Mode + dps: + - id: 2 + type: string + name: work_mode + mapping: + - dps_val: auto_clean + value: Auto Clean + - dps_val: manual_clean + value: Manual Clean + - entity: number + category: config + name: Cleaning Delay + dps: + - id: 5 + type: integer + name: delay_clean_time + range: + min: 6 + max: 1200 + unit: s + step: 3 + - entity: sensor + category: diagnostic + name: Last Weight + class: weight + dps: + - id: 6 + type: integer + name: cat_weight + unit: kg + class: measurement + scale: 10 + - entity: sensor + category: diagnostic + name: Time Used (Today) + dps: + - id: 7 + type: integer + name: excretion_times_day + class: measurement + - entity: button + category: config + name: Manual Clean + dps: + - id: 9 + type: boolean + name: manual_clean From 33230d183ffbcdb946e1db21b028cb400495bf0e Mon Sep 17 00:00:00 2001 From: Rodney Nissen Date: Tue, 28 Mar 2023 08:26:34 -0400 Subject: [PATCH 64/74] Fixing some issues with Secondary entity, putting Cleaning Mode as primary entity --- .../tuya_local/devices/leos_loo_too.yaml | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/custom_components/tuya_local/devices/leos_loo_too.yaml b/custom_components/tuya_local/devices/leos_loo_too.yaml index 86c62d6165..935c38f450 100644 --- a/custom_components/tuya_local/devices/leos_loo_too.yaml +++ b/custom_components/tuya_local/devices/leos_loo_too.yaml @@ -1,26 +1,26 @@ -name: Leo’s Loo Too +name: Leo's Loo Too products: - id: 1badzyvwh1e1hrog primary_entity: - entity: switch - name: Power + entity: select + category: config + name: Cleaning Mode dps: - - id: 1 - name: switch - type: boolean + - id: 2 + type: string + name: work_mode + mapping: + - dps_val: auto_clean + value: Auto Clean + - dps_val: manual_clean + value: Manual Clean secondary_entities: - - entity: select - category: config - name: Cleaning Mode + - entity: switch + name: Power dps: - - id: 2 - type: string - name: work_mode - mapping: - - dps_val: auto_clean - value: Auto Clean - - dps_val: manual_clean - value: Manual Clean + - id: 1 + name: switch + type: boolean - entity: number category: config name: Cleaning Delay @@ -43,7 +43,8 @@ secondary_entities: name: cat_weight unit: kg class: measurement - scale: 10 + mapping: + - scale: 0.1 - entity: sensor category: diagnostic name: Time Used (Today) From dbaad8e2c66ef9248fd04930fe184155ff72cbaa Mon Sep 17 00:00:00 2001 From: Rodney Nissen Date: Mon, 29 Jan 2024 16:08:37 -0500 Subject: [PATCH 65/74] add leo's loo too in --- custom_components/tuya_local/devices/leos_loo_too.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/custom_components/tuya_local/devices/leos_loo_too.yaml b/custom_components/tuya_local/devices/leos_loo_too.yaml index 935c38f450..37476736a8 100644 --- a/custom_components/tuya_local/devices/leos_loo_too.yaml +++ b/custom_components/tuya_local/devices/leos_loo_too.yaml @@ -9,6 +9,7 @@ primary_entity: - id: 2 type: string name: work_mode + category: config mapping: - dps_val: auto_clean value: Auto Clean @@ -17,6 +18,7 @@ primary_entity: secondary_entities: - entity: switch name: Power + category: config dps: - id: 1 name: switch @@ -36,25 +38,26 @@ secondary_entities: - entity: sensor category: diagnostic name: Last Weight + icon: "mdi:scale" class: weight dps: - id: 6 type: integer name: cat_weight unit: kg - class: measurement mapping: - scale: 0.1 - entity: sensor category: diagnostic name: Time Used (Today) + icon: "mdi:counter" dps: - id: 7 type: integer name: excretion_times_day - class: measurement - entity: button category: config + icon: "mdi:heat-pump-outline" name: Manual Clean dps: - id: 9 From 27e74e56bc8efafa3b351e50b7d293709735b57f Mon Sep 17 00:00:00 2001 From: Rodney Nissen Date: Mon, 29 Jan 2024 16:27:07 -0500 Subject: [PATCH 66/74] Adding a few last items to Leos Loo --- .../tuya_local/devices/leos_loo_too.yaml | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/custom_components/tuya_local/devices/leos_loo_too.yaml b/custom_components/tuya_local/devices/leos_loo_too.yaml index 37476736a8..bb941509c8 100644 --- a/custom_components/tuya_local/devices/leos_loo_too.yaml +++ b/custom_components/tuya_local/devices/leos_loo_too.yaml @@ -9,6 +9,7 @@ primary_entity: - id: 2 type: string name: work_mode + icon: "mdi:refresh-auto" category: config mapping: - dps_val: auto_clean @@ -19,17 +20,37 @@ secondary_entities: - entity: switch name: Power category: config + icon: "mdi:power" + class: switch dps: - id: 1 name: switch type: boolean + - entity: switch + name: UV + category: config + icon: "mdi:alarm-light" + class: switch + dps: + - id: 13 + name: switch + type: boolean + - entity: switch + name: Light + category: config + icon: "mdi:lightbulb-outline" + class: switch + dps: + - id: 16 + name: switch + type: boolean - entity: number category: config name: Cleaning Delay dps: - id: 5 type: integer - name: delay_clean_time + name: value range: min: 6 max: 1200 From caae57927673cdc67d996ebd10277355a1faee27 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 12 Feb 2024 13:46:38 +0900 Subject: [PATCH 67/74] Leo's Loo Too: Update with changes from review --- .../tuya_local/devices/leos_loo_too.yaml | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/custom_components/tuya_local/devices/leos_loo_too.yaml b/custom_components/tuya_local/devices/leos_loo_too.yaml index bb941509c8..0264e03375 100644 --- a/custom_components/tuya_local/devices/leos_loo_too.yaml +++ b/custom_components/tuya_local/devices/leos_loo_too.yaml @@ -1,6 +1,7 @@ -name: Leo's Loo Too +name: Pet toilet products: - id: 1badzyvwh1e1hrog + name: "Leo's Loo Too" primary_entity: entity: select category: config @@ -8,7 +9,7 @@ primary_entity: dps: - id: 2 type: string - name: work_mode + name: option icon: "mdi:refresh-auto" category: config mapping: @@ -35,11 +36,8 @@ secondary_entities: - id: 13 name: switch type: boolean - - entity: switch - name: Light + - entity: light category: config - icon: "mdi:lightbulb-outline" - class: switch dps: - id: 16 name: switch @@ -55,27 +53,28 @@ secondary_entities: min: 6 max: 1200 unit: s - step: 3 + mapping: + - step: 3 - entity: sensor category: diagnostic - name: Last Weight + name: Last weight icon: "mdi:scale" class: weight dps: - id: 6 type: integer - name: cat_weight + name: sensor unit: kg mapping: - scale: 0.1 - entity: sensor category: diagnostic - name: Time Used (Today) + name: Times used today icon: "mdi:counter" dps: - id: 7 type: integer - name: excretion_times_day + name: sensor - entity: button category: config icon: "mdi:heat-pump-outline" @@ -83,4 +82,4 @@ secondary_entities: dps: - id: 9 type: boolean - name: manual_clean + name: button From 08b472b26cb94d09c89b16d5ff848eaa2fb19f03 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 12 Feb 2024 13:51:32 +0900 Subject: [PATCH 68/74] Leo's Loo Too: more naming and icon changes Some things missed during initial review --- .../tuya_local/devices/leos_loo_too.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/custom_components/tuya_local/devices/leos_loo_too.yaml b/custom_components/tuya_local/devices/leos_loo_too.yaml index 0264e03375..36b266a86b 100644 --- a/custom_components/tuya_local/devices/leos_loo_too.yaml +++ b/custom_components/tuya_local/devices/leos_loo_too.yaml @@ -5,18 +5,18 @@ products: primary_entity: entity: select category: config - name: Cleaning Mode + name: Cleaning mode + icon: "mdi:refresh-auto" dps: - id: 2 type: string name: option - icon: "mdi:refresh-auto" category: config mapping: - dps_val: auto_clean - value: Auto Clean + value: Auto clean - dps_val: manual_clean - value: Manual Clean + value: Manual clean secondary_entities: - entity: switch name: Power @@ -28,7 +28,7 @@ secondary_entities: name: switch type: boolean - entity: switch - name: UV + name: UV sterilization category: config icon: "mdi:alarm-light" class: switch @@ -44,7 +44,8 @@ secondary_entities: type: boolean - entity: number category: config - name: Cleaning Delay + name: Cleaning delay + icon: "mdi:camera-timer" dps: - id: 5 type: integer @@ -78,7 +79,7 @@ secondary_entities: - entity: button category: config icon: "mdi:heat-pump-outline" - name: Manual Clean + name: Manual clean dps: - id: 9 type: boolean From a756ec8a0fb8af7797eb5953ceccaf05ab14b9ee Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 12 Feb 2024 14:11:05 +0900 Subject: [PATCH 69/74] Leo's Loo Too: remove category on daily use entities Unmarked weight (removed name to us translations), times used today, and manual clean. Moved "Times used today" count to primary, rather than the auto/manual clean config. PR #1577 --- .../tuya_local/devices/leos_loo_too.yaml | 45 +++++++++---------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/custom_components/tuya_local/devices/leos_loo_too.yaml b/custom_components/tuya_local/devices/leos_loo_too.yaml index 36b266a86b..68f7aa882d 100644 --- a/custom_components/tuya_local/devices/leos_loo_too.yaml +++ b/custom_components/tuya_local/devices/leos_loo_too.yaml @@ -3,20 +3,13 @@ products: - id: 1badzyvwh1e1hrog name: "Leo's Loo Too" primary_entity: - entity: select - category: config - name: Cleaning mode - icon: "mdi:refresh-auto" + entity: sensor + name: Times used today + icon: "mdi:counter" dps: - - id: 2 - type: string - name: option - category: config - mapping: - - dps_val: auto_clean - value: Auto clean - - dps_val: manual_clean - value: Manual clean + - id: 7 + type: integer + name: sensor secondary_entities: - entity: switch name: Power @@ -27,6 +20,20 @@ secondary_entities: - id: 1 name: switch type: boolean + - entity: select + category: config + name: Cleaning mode + icon: "mdi:refresh-auto" + dps: + - id: 2 + type: string + name: option + category: config + mapping: + - dps_val: auto_clean + value: Auto clean + - dps_val: manual_clean + value: Manual clean - entity: switch name: UV sterilization category: config @@ -57,9 +64,6 @@ secondary_entities: mapping: - step: 3 - entity: sensor - category: diagnostic - name: Last weight - icon: "mdi:scale" class: weight dps: - id: 6 @@ -68,16 +72,7 @@ secondary_entities: unit: kg mapping: - scale: 0.1 - - entity: sensor - category: diagnostic - name: Times used today - icon: "mdi:counter" - dps: - - id: 7 - type: integer - name: sensor - entity: button - category: config icon: "mdi:heat-pump-outline" name: Manual clean dps: From 4aa8e01667db6c101c7def1321e852871e05018e Mon Sep 17 00:00:00 2001 From: Ben <44917135+BenJamesAndo@users.noreply.github.com> Date: Thu, 8 Feb 2024 21:55:32 +1000 Subject: [PATCH 70/74] Create comon_lights.yaml --- .../tuya_local/devices/comon_lights.yaml | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 custom_components/tuya_local/devices/comon_lights.yaml diff --git a/custom_components/tuya_local/devices/comon_lights.yaml b/custom_components/tuya_local/devices/comon_lights.yaml new file mode 100644 index 0000000000..d6eaa3a528 --- /dev/null +++ b/custom_components/tuya_local/devices/comon_lights.yaml @@ -0,0 +1,125 @@ +name: 8 Functions light +products: + - id: swzi5fagtytgxe0f + name: 8 Functions light +primary_entity: + entity: light + dps: + - id: 20 + type: boolean + name: switch + - id: 22 + name: brightness + type: integer + range: + min: 10 + max: 1000 + mapping: + - scale: 3.92 + - id: 25 + name: scene_data + type: hex + optional: true + - id: 27 + name: music_data + type: hex + optional: true + - id: 28 + name: control_data + type: hex + optional: true + - id: 101 + name: scene_list + # scene_configuration + type: string + - id: 103 + name: scene_combine + type: string + # sets what 6 scenes get used + optional: true + - id: 102 + name: scene + type: string + optional: true +secondary_entities: + - entity: select + name: Scene + icon: "mdi:palette" + category: config + dps: + - id: 102 + type: string + name: option + mapping: + - dps_val: "1e03e801f40000000" + value: Combination - All + - dps_val: "0c03e801f43000000" + value: "In Waves - Slow" + - dps_val: "0c03e801f41000000" + value: "In Waves - Fast" + - dps_val: "0c03e801f40100000" + value: "In Waves - Cycle" + - dps_val: "1603e801f43000000" + value: "Sequential - Slow" + - dps_val: "1603e801f41000000" + value: "Sequential - Fast" + - dps_val: "1603e801f40100000" + value: "Sequential - Cycle" + - dps_val: "0601e401f43000000" + value: "Slo-Glo - Slow" + - dps_val: "0601e401f41000000" + value: "Slo-Glo - Fast" + - dps_val: "0601e401f40100000" + value: "Slo-Glo - Cycle" + - dps_val: "1d03e801f43000000" + value: "Chasing - Slow" + - dps_val: "1d03e801f41000000" + value: "Chasing - Fast" + - dps_val: "1d03e801f40100000" + value: "Chasing - Cycle" + - dps_val: "0503e801f43000000" + value: "Slow Fade - Slow" + - dps_val: "0503e801f41000000" + value: "Slow Fade - Fast" + - dps_val: "0503e801f40100000" + value: "Slow Fade - Cycle" + - dps_val: "1903e801f43000000" + value: "Twinkle - Slow" + - dps_val: "1903e801f41000000" + value: "Twinkle - Fast" + - dps_val: "1903e801f40100000" + value: "Twinkle - Cycle" + - dps_val: "0003e801f40000000" + value: "Steady On" + default: true + - entity: select + name: Mode + icon: "mdi:lightbulb-auto" + category: config + dps: + - id: 21 + type: string + optional: true + name: option + mapping: + - dps_val: scene + value: Scene + - dps_val: music + value: Music + - entity: number + name: Timer + category: config + icon: "mdi:timer" + dps: + - id: 26 + name: value + type: integer + optional: true + range: + min: 0 + max: 86400 + unit: min + mapping: + - scale: 60 + step: 60 + - dps_val: null From 57e51e95d29379762dbc5e87b80137d93a2e8089 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 12 Feb 2024 14:33:56 +0900 Subject: [PATCH 71/74] Comon lights: naming tweaks and update to light platform - Avoid names starting with numbers, as they may have problems in some obscure places - use branding in product name - use light effect for mode instead of a separate select entity - remove scale from brightness as it is no longer needed (#1444) --- .../tuya_local/devices/comon_lights.yaml | 164 +++++++++--------- 1 file changed, 78 insertions(+), 86 deletions(-) diff --git a/custom_components/tuya_local/devices/comon_lights.yaml b/custom_components/tuya_local/devices/comon_lights.yaml index d6eaa3a528..a9fd42ab42 100644 --- a/custom_components/tuya_local/devices/comon_lights.yaml +++ b/custom_components/tuya_local/devices/comon_lights.yaml @@ -1,21 +1,27 @@ -name: 8 Functions light +name: String light controller products: - id: swzi5fagtytgxe0f - name: 8 Functions light + name: Lexi Lighting LLXAPT01 primary_entity: entity: light dps: - id: 20 type: boolean name: switch + - id: 21 + type: string + name: effect + mapping: + - dps_val: scene + value: Scene + - dps_val: music + value: Music - id: 22 name: brightness type: integer range: min: 10 max: 1000 - mapping: - - scale: 3.92 - id: 25 name: scene_data type: hex @@ -41,85 +47,71 @@ primary_entity: name: scene type: string optional: true -secondary_entities: - - entity: select - name: Scene - icon: "mdi:palette" - category: config - dps: - - id: 102 - type: string - name: option - mapping: - - dps_val: "1e03e801f40000000" - value: Combination - All - - dps_val: "0c03e801f43000000" - value: "In Waves - Slow" - - dps_val: "0c03e801f41000000" - value: "In Waves - Fast" - - dps_val: "0c03e801f40100000" - value: "In Waves - Cycle" - - dps_val: "1603e801f43000000" - value: "Sequential - Slow" - - dps_val: "1603e801f41000000" - value: "Sequential - Fast" - - dps_val: "1603e801f40100000" - value: "Sequential - Cycle" - - dps_val: "0601e401f43000000" - value: "Slo-Glo - Slow" - - dps_val: "0601e401f41000000" - value: "Slo-Glo - Fast" - - dps_val: "0601e401f40100000" - value: "Slo-Glo - Cycle" - - dps_val: "1d03e801f43000000" - value: "Chasing - Slow" - - dps_val: "1d03e801f41000000" - value: "Chasing - Fast" - - dps_val: "1d03e801f40100000" - value: "Chasing - Cycle" - - dps_val: "0503e801f43000000" - value: "Slow Fade - Slow" - - dps_val: "0503e801f41000000" - value: "Slow Fade - Fast" - - dps_val: "0503e801f40100000" - value: "Slow Fade - Cycle" - - dps_val: "1903e801f43000000" - value: "Twinkle - Slow" - - dps_val: "1903e801f41000000" - value: "Twinkle - Fast" - - dps_val: "1903e801f40100000" - value: "Twinkle - Cycle" - - dps_val: "0003e801f40000000" - value: "Steady On" - default: true - - entity: select - name: Mode - icon: "mdi:lightbulb-auto" - category: config - dps: - - id: 21 - type: string - optional: true - name: option - mapping: - - dps_val: scene - value: Scene - - dps_val: music - value: Music - - entity: number - name: Timer - category: config - icon: "mdi:timer" - dps: - - id: 26 - name: value - type: integer - optional: true - range: - min: 0 - max: 86400 - unit: min - mapping: - - scale: 60 - step: 60 - - dps_val: null +secondary_entities: + - entity: select + name: Scene + icon: "mdi:palette" + category: config + dps: + - id: 102 + type: string + name: option + mapping: + - dps_val: "1e03e801f40000000" + value: Combination - All + - dps_val: "0c03e801f43000000" + value: "In Waves - Slow" + - dps_val: "0c03e801f41000000" + value: "In Waves - Fast" + - dps_val: "0c03e801f40100000" + value: "In Waves - Cycle" + - dps_val: "1603e801f43000000" + value: "Sequential - Slow" + - dps_val: "1603e801f41000000" + value: "Sequential - Fast" + - dps_val: "1603e801f40100000" + value: "Sequential - Cycle" + - dps_val: "0601e401f43000000" + value: "Slo-Glo - Slow" + - dps_val: "0601e401f41000000" + value: "Slo-Glo - Fast" + - dps_val: "0601e401f40100000" + value: "Slo-Glo - Cycle" + - dps_val: "1d03e801f43000000" + value: "Chasing - Slow" + - dps_val: "1d03e801f41000000" + value: "Chasing - Fast" + - dps_val: "1d03e801f40100000" + value: "Chasing - Cycle" + - dps_val: "0503e801f43000000" + value: "Slow Fade - Slow" + - dps_val: "0503e801f41000000" + value: "Slow Fade - Fast" + - dps_val: "0503e801f40100000" + value: "Slow Fade - Cycle" + - dps_val: "1903e801f43000000" + value: "Twinkle - Slow" + - dps_val: "1903e801f41000000" + value: "Twinkle - Fast" + - dps_val: "1903e801f40100000" + value: "Twinkle - Cycle" + - dps_val: "0003e801f40000000" + value: "Steady On" + default: true + - entity: number + name: Timer + category: config + icon: "mdi:timer" + dps: + - id: 26 + name: value + type: integer + optional: true + range: + min: 0 + max: 86400 + unit: min + mapping: + - scale: 60 + step: 60 + - dps_val: null From 783c3d5606490a7e8525c31eed7736a1edc31417 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 12 Feb 2024 16:44:18 +0900 Subject: [PATCH 72/74] CI: upgrade to python 3.12 HA is now deefaulting to 3.12, so follow step. --- .github/workflows/linting.yml | 2 +- .github/workflows/tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 80a8e24f3a..fa41bf596a 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -11,7 +11,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' - name: Install dependencies run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c94b7d4142..f16ef5ab5d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.11'] + python-version: ['3.12'] steps: - uses: actions/checkout@v3 From 4cacb4ea4a77a4aa0013fcdb8db830ae41e74aa0 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 12 Feb 2024 18:00:18 +0900 Subject: [PATCH 73/74] Docs for recent PRs PR #1577, #1630 --- ACKNOWLEDGEMENTS.md | 2 ++ DEVICES.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index ade468326f..75f0833226 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -490,3 +490,5 @@ Further device support has been made with the assistance of users. Please consid - [lowebb](https://github.com/lowebb) for contributing support for Wärme Designer wall panel heaters. - [mmorenocab](https://github.com/mmorenocab) for assisting with support for Meterk single phase clamp meters. - [KoKolaj](https://github.com/KoKolaj) for assisting with support for Tesla Smart XL dehumidifiers. +- [BenJamesAndo](https://github.com/BenJamesAndo) for contributing support for Lexi Lighting string light WiFi adapters. +- [LordPsycho202](https://github.com/LordPsycho202) for contributing support for Leo's Loo Too pet toilets. diff --git a/DEVICES.md b/DEVICES.md index 59bea1c7ee..7c04dbe6af 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -452,6 +452,7 @@ of device. - HDMI sync light - iHD001 LED controller - Kojima motion sensor RGBCW nightlight +- Lexi Lighting string light Wifi adapter - Loycco sound machine with nightlight (also sold as Momland nightlight with white noise) - Loginovo TV sync backlight - Lytmi Fantasy/Neo 3 HDMI sync backlight @@ -611,6 +612,7 @@ port and password. - Kogan bidet toilet seat - Kogan KAWHTNOSLPA white noise sleep aid - Konlen/Rockson WF96L water level controller +- Leo's Loo Too pet toilet - Mirabella Genio motion sensor - Momcozy white noise machine (2 variants) - Nedis WIFISA10CWT air quality monitor From 7ec76dcd686302508631639f52ddb2df753fede1 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 12 Feb 2024 19:02:17 +0900 Subject: [PATCH 74/74] Add support for Mirabella Genio Pixel oval light Issue #1538 --- ACKNOWLEDGEMENTS.md | 1 + DEVICES.md | 1 + .../devices/mirabella_geniopixel_light.yaml | 121 ++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 custom_components/tuya_local/devices/mirabella_geniopixel_light.yaml diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 75f0833226..764f1b34b2 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -492,3 +492,4 @@ Further device support has been made with the assistance of users. Please consid - [KoKolaj](https://github.com/KoKolaj) for assisting with support for Tesla Smart XL dehumidifiers. - [BenJamesAndo](https://github.com/BenJamesAndo) for contributing support for Lexi Lighting string light WiFi adapters. - [LordPsycho202](https://github.com/LordPsycho202) for contributing support for Leo's Loo Too pet toilets. +- [RoelDU](https://github.com/RoelDU) for assisting with support for Mirabella Genio Pixel oval lights. diff --git a/DEVICES.md b/DEVICES.md index 7c04dbe6af..29821b5dbd 100644 --- a/DEVICES.md +++ b/DEVICES.md @@ -457,6 +457,7 @@ of device. - Loginovo TV sync backlight - Lytmi Fantasy/Neo 3 HDMI sync backlight - Marpou RGBCW ceiling light +- Mirabella Genio Pixel LED oval light - Moes dimmer switch - Moes motion sensor lights (XZ-CGV3) - Moes star projector diff --git a/custom_components/tuya_local/devices/mirabella_geniopixel_light.yaml b/custom_components/tuya_local/devices/mirabella_geniopixel_light.yaml new file mode 100644 index 0000000000..daaf62ee2c --- /dev/null +++ b/custom_components/tuya_local/devices/mirabella_geniopixel_light.yaml @@ -0,0 +1,121 @@ +name: Ceiling light +products: + - id: kllgg1iuwrtcvlnp + name: Mirabella Genio Pixel LED Oval light +primary_entity: + entity: light + dps: + - id: 20 + type: boolean + name: switch + - id: 21 + type: string + name: color_mode + mapping: + - dps_val: white + value: color_temp + - dps_val: colour + value: hs + - dps_val: static + value: Static + - dps_val: pre_set + value: Preset + - dps_val: custom + value: Custom + - dps_val: local_music + value: Music + - id: 22 + type: integer + name: brightness + range: + min: 10 + max: 1000 + - id: 23 + type: integer + name: color_temp + range: + min: 0 + max: 1000 + mapping: + - target_range: + min: 2700 + max: 6500 + - id: 24 + type: hex + name: rgbhsv + format: + - name: h + bytes: 2 + range: + min: 0 + max: 360 + - name: s + bytes: 2 + range: + min: 0 + max: 1000 + - name: v + bytes: 2 + range: + min: 0 + max: 1000 + - id: 25 + type: hex + name: scene_data + optional: true + - id: 101 + type: string + name: scene_num + - id: 105 + type: base64 + name: debug_info +secondary_entities: + - entity: number + name: Timer + category: config + icon: "mdi:timer" + dps: + - id: 26 + type: integer + name: value + unit: min + range: + min: 0 + max: 86400 + mapping: + - scale: 60 + step: 60 + - entity: number + name: Scene data reset + category: config + icon: "mdi:palette" + dps: + - id: 102 + type: integer + optional: true + name: value + range: + min: 0 + max: 255 + - entity: number + name: LED number + category: config + icon: "mdi:counter" + dps: + - id: 103 + type: integer + name: value + range: + min: 1 + max: 150 + - entity: number + name: Scene index + category: config + icon: "mdi:palette" + dps: + - id: 104 + type: integer + name: value + range: + min: 0 + max: 11