Open DeerMaximum opened 1 year ago
This is a major problem as now all of my number entities are broken and unavailable. I don't understand how 4.0.2 was considered a fix for the number entity when in fact it broke them, at least for me.
Seems there should have been conversion code in place for this last fix. My data looks like this:
"data": {
"region": "us",
"username": "localtuya",
"no_cloud": true,
"client_id": "...",
"client_secret": "...",
"user_id": "...",
"devices": {
"xxxxxxxxxxxxxxxxx": {
"friendly_name": "Coffee Maker",
"host": "xxx.xx.xx.xxx",
"local_key": "c29...eb7",
"protocol_version": "3.3",
"entities": [
{
"friendly_name": "Coffee Maker Start/Pause",
"current": 101,
"id": 101,
"platform": "switch"
},
{
"friendly_name": "Coffee Maker Working Mode",
"id": 102,
"platform": "sensor"
},
{
"friendly_name": "Coffee Maker Reservation",
"min_value": 0.0,
"max_value": 1440.0,
"id": 103,
"platform": "number"
},
{
"friendly_name": "Coffee Maker Timer Functon Switch",
"min_value": 0.0,
"max_value": 1.0,
"id": 109,
"platform": "number"
},
{
"friendly_name": "Coffee Maker Suspend",
"current": 108,
"id": 108,
"platform": "switch"
},
{
"friendly_name": "Coffee Maker Material Selection",
"select_options": "chroma_1;chroma_2;chroma_3",
"select_options_friendly": "Regular;Medium;Strong",
"id": 107,
"platform": "select"
},
{
"friendly_name": "Coffee Maker Material Selection State",
"id": 106,
"platform": "sensor"
},
{
"friendly_name": "Coffee Maker Status",
"id": 105,
"platform": "sensor"
}
],
"device_id": "xxxxxxxxxxxxxxxxx",
"dps_strings": [
"101 (value: False)",
"102 (value: auto)",
"103 (value: 720)",
"105 (value: 0)",
"106 (value: chroma_3)",
"107 (value: chroma_3)",
"108 (value: False)",
"109 (value: False)"
],
"product_key": "xxxxxxxxxxxxxxxxx"
}
},
"updated_at": "1659294529659",
"cloud_devices": {}
}
@DeerMaximum out of curiosity I tried editing my device and setting up the entities again. This appears to have fixed the issue with the stored configuration having min_value
& max_value
instead of native_min_value
& native_max_value
.
Yes, changing the values manually also solved the problem for me.
@timnolte Can you please show where you updated this? is it /config/.storage/core.config_entries? I cant find anything within /config/custom_components/localtuya/ Thanks
@megarch2021 I did this via the device Configuration in the Home Assistant UI, not via any configuration file. I chose the option to edit an existing device.
The problem
After the update to 4.0.2, entities with the platform number can no longer be created. This is because the update changed the configuration keys from
min_value
tonative_min_value
andmax_value
tonative_max_value
without fixing the values in existing configurations and without mentioning it in the changelogs.Environment
Steps to reproduce
Configuration
configuration.yaml
orconfig_flow
DP dump
Provide Home Assistant taceback/logs
Additional information