make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.4k stars 535 forks source link

Request support for [HTW-TD-080KOID (KOI DUO) - Electric water heater with wifi] #1831

Closed MerzkayaGnida closed 5 months ago

MerzkayaGnida commented 7 months ago

Log Message

Device matches desk_lamp with quality of 25%. DPS: {"updated_at": 1713199125.6721308, "1": true, "2": "jiheat", "9": 60, "10": 57, "12": 0, "13": "heating", "14": 85, "20": 0}

Please paste logs here

Information about DPS mappings

Information about DPS mappings "Query Things Data Model":

{
  "result": {
    "model": "{\"modelId\":\"dywwh4\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"switch\",\"description\":\"\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"开关\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":2,\"accessMode\":\"rw\",\"code\":\"mode\",\"description\":\"即热、智能ECO\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"模式\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"jiheat\",\"maneco\"]}},
{\"abilityId\":9,\"accessMode\":\"rw\",\"code\":\"temp_set\",\"description\":\"\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"温度设置\",\"typeSpec\":{\"type\":\"value\",\"max\":80,\"min\":40,\"scale\":0,\"step\":10,\"unit\":\"℃\"}},
{\"abilityId\":10,\"accessMode\":\"ro\",\"code\":\"temp_current\",\"description\":\"\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"当前温度\",\"typeSpec\":{\"type\":\"value\",\"max\":100,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"℃\"}},
{\"abilityId\":12,\"accessMode\":\"ro\",\"code\":\"power_consumption\",\"description\":\"\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"耗电量\",\"typeSpec\":{\"type\":\"value\",\"max\":10000,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"kwh\"}},
{\"abilityId\":13,\"accessMode\":\"ro\",\"code\":\"work_state\",\"description\":\"待机、加热中、保温中、预约中\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"工作状态\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"standby\",\"heating\",\"warm\",\"yuyueing\"]}},
{\"abilityId\":14,\"accessMode\":\"ro\",\"code\":\"surplus_water\",\"description\":\"\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"剩余热水量\",\"typeSpec\":{\"type\":\"value\",\"max\":100,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"%\"}},
{\"abilityId\":20,\"accessMode\":\"ro\",\"code\":\"fault\",\"description\":\"干烧故障、传感器故障、超温故障\",\"extensions\":{\"scope\":\"fault\",\"attribute\":\"128\"},\"name\":\"故障告警\",\"typeSpec\":{\"type\":\"bitmap\",\"label\":[\"E2\",\"E3\",\"E4\"],\"maxlen\":3}}]}]}"
  },
  "success": true,
  "t": 1713191288621,
  "tid": "615ced75fb3411ee83bd6a1108d921ac"
}
Information about DPS mappings "Device Control / Query Properties" { "result": { "properties": [ { "code": "switch", "custom_name": "", "dp_id": 1, "time": 1713168180815, "value": true }, { "code": "mode", "custom_name": "", "dp_id": 2, "time": 1713168179233, "value": "jiheat" }, { "code": "temp_set", "custom_name": "", "dp_id": 9, "time": 1713168179814, "value": 60 }, { "code": "temp_current", "custom_name": "", "dp_id": 10, "time": 1713183657568, "value": 58 }, { "code": "power_consumption", "custom_name": "", "dp_id": 12, "time": 1713180739969, "value": 3 }, { "code": "work_state", "custom_name": "", "dp_id": 13, "time": 1713180739969, "value": "warm" }, { "code": "surplus_water", "custom_name": "", "dp_id": 14, "time": 1713183657935, "value": 90 }, { "code": "fault", "custom_name": "", "dp_id": 20, "time": 1713168180864, "value": 0 } ] }, "success": true, "t": 1713187226062, "tid": "ebe89b81fb2a11eebfdcf20bbc22db8f" } and "Get the specifications and properties of the device": { "result": { "category": "rs", "functions": [ { "code": "switch", "desc": "{}", "name": "开关", "type": "Boolean", "values": "{}" }, { "code": "temp_set", "desc": "{\"unit\":\"℃\",\"min\":40,\"max\":80,\"scale\":0,\"step\":10}", "name": "温度设置", "type": "Integer", "values": "{\"unit\":\"℃\",\"min\":40,\"max\":80,\"scale\":0,\"step\":10}" } ], "status": [ { "code": "switch", "name": "开关", "type": "Boolean", "values": "{}" }, { "code": "temp_set", "name": "温度设置", "type": "Integer", "values": "{\"unit\":\"℃\",\"min\":40,\"max\":80,\"scale\":0,\"step\":10}" }, { "code": "temp_current", "name": "当前温度", "type": "Integer", "values": "{\"unit\":\"℃\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}" }, { "code": "power_consumption", "name": "耗电量", "type": "Integer", "values": "{\"unit\":\"kwh\",\"min\":0,\"max\":10000,\"scale\":0,\"step\":1}" }, { "code": "work_state", "name": "工作状态", "type": "Enum", "values": "{\"range\":[\"standby\",\"heating\",\"warm\"]}" }, { "code": "surplus_water", "name": "剩余水量", "type": "Integer", "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}" }, { "code": "fault", "name": "故障告警", "type": "bitmap", "values": "{\"label\":[\"E2\",\"E3\",\"E4\"]}" } ] }, "success": true, "t": 1713187964445, "tid": "a40545fffb2c11eea56dde7960427246"

Product ID

"product_id": "7lkpskrohoygvb8y",
"product_name": "Double tank electric water heater",

Information about how the device functions

https://htwspain.com/es/agua-caliente/termos-electricos/koi-duo/

Just a water heater (in addition to the standard functions of on/off and setting the set temperature, there is a certain smart mode, the meaning of which is some kind of intelligent learning, but access to it from the control or application is only on/off)

MerzkayaGnida commented 5 months ago

I would like to request that a feature be added to manually set the device to the disabled state.

make-all commented 5 months ago

HA already has this feature, there is no need to add another way of doing the same thing

MerzkayaGnida commented 5 months ago

The fact is that the services water_heater.turn_off and water_heater.turn_on either generate an error (if applied to device_id):

service: water_heater.turn_off data: {} target: device_id: 6238fba73542780d63c80783853099b4

water_heater.turn_off. extra keys not allowed @ data['device_id']. Got None

or pretend that the service has worked, but does not physically change the state of the device in any way (if applied to entity_id): call service

service: water_heater.turn_off (ore .turn_on) target: entity_id: water_heater.htw_tl data: {}

visually indicates success, but the device does not change state.

service: water_heater.set_away_mode data: away_mode: false target: entity_id: water_heater.htw_tl

results in an error:

water_heater.set_away_mode. Unknown error

In this case, the change in target temperature occurs successfully:

service: water_heater.set_temperature data: temperature: 50 target: entity_id: water_heater.htw_tl

~~In the previous release (2024.3.2), you could manually configure all data In the previous release, you could manually configure all the data (dps id=1) and enable/disable it worked perfectly.~~ Wrong. It was in localtuya.

сб, 1 июн. 2024 г. в 18:35, Jason Rumney @.***>:

HA already has this feature, there is no need to add another way of doing the same thing

— Reply to this email directly, view it on GitHub https://github.com/make-all/tuya-local/issues/1831#issuecomment-2143507653, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMO2HDFJOZO26WVA6S7ZY2TZFHZ4ZAVCNFSM6AAAAABGHW6IROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTGUYDONRVGM . You are receiving this because you authored the thread.Message ID: @.***>

make-all commented 5 months ago

You can find the list of available services for water heaters here:

https://www.home-assistant.io/integrations/water_heater/#services