I have this device (from https://api.myuplink.com/v2/systems/me)
{
"systemId": "XXXXXXXXXXXX",
"name": "XXXXXXXXXXXX",
"securityLevel": "admin",
"hasAlarm": false,
"country": "XXXXXXXXXXXX",
"devices": [
{
"id": "01230C150039A88D50",
"connectionState": "Connected",
"currentFwVersion": "1.22",
"deviceType": "",
"product": {
"serialNumber": "XXXXXXXXXXXX",
"name": "iGate 2.0"
}
}
]
},
the indoor climate cool/heat setpoint is writable per the API (from https://api.myuplink.com/v2/devices/012303961C6FB35E50/points):
{
"category": "1.2 - Indoor Climate",
"parameterId": "160121",
"parameterName": "Heat Setpoint",
"parameterUnit": "°F",
"writable": true,
"timestamp": "2026-04-05T21:58:21+00:00",
"value": 68,
"strVal": "68°F",
"smartHomeCategories": [],
"minValue": null,
"maxValue": null,
"stepValue": 10,
"enumValues": [],
"scaleValue": "0.1",
"zoneId": null
},
{
"category": "1.2 - Indoor Climate",
"parameterId": "160122",
"parameterName": "Cool Setpoint",
"parameterUnit": "°F",
"writable": true,
"timestamp": "2026-04-05T21:58:21+00:00",
"value": 73,
"strVal": "73°F",
"smartHomeCategories": [],
"minValue": null,
"maxValue": null,
"stepValue": 10,
"enumValues": [],
"scaleValue": "0.1",
"zoneId": null
},
but i believe it's being fildertered into read only sensor in HA (i.e. sensor.igate_2_0_XXXXXXXXXXXX_1_2_indoor_climate_cool_setpoint_160122) by this python:
|
if (self.max_value or self.min_value) and self.is_writable: |
|
return Platform.NUMBER |
since the manufacturer of the iGate 2.0 hasn't added min/max value it's falling back to default return Platform.SENSOR
Proposed fix
Can we change the logic slightly to this?
if (self.max_value or self.min_value) and self.is_writable:
return Platform.NUMBER
# Also expose writable numeric-unit params without min/max as number entities
if self.is_writable and len(self.enum_values) == 0 and self.unit:
return Platform.NUMBER
I can open a PR. I don't think this breaks any of the other entities during discovery. One edge case to consider is parameter 160303
{
"category": "1.1 - Thermostat Settings",
"parameterId": "160303",
"parameterName": "Thermostat Name",
"parameterUnit": "",
"writable": true,
"timestamp": "2026-04-05T21:58:21+00:00",
"value": "",
"strVal": "",
"smartHomeCategories": [],
"minValue": null,
"maxValue": null,
"stepValue": 1,
"enumValues": [],
"scaleValue": "1",
"zoneId": null
},
writable: true, enumValues: [], unit: "", minValue: null, maxValue: null
value: ""
My proposal above requires self.unit (truthy), so an empty unit "" evaluates to False — this parameter is correctly skipped and stays as Platform.SENSOR
I have this device (from https://api.myuplink.com/v2/systems/me)
the indoor climate cool/heat setpoint is writable per the API (from https://api.myuplink.com/v2/devices/012303961C6FB35E50/points):
but i believe it's being fildertered into read only sensor in HA (i.e.
sensor.igate_2_0_XXXXXXXXXXXX_1_2_indoor_climate_cool_setpoint_160122) by this python:home-assistant-myuplink/custom_components/myuplink/api.py
Lines 319 to 320 in 63f6a50
since the manufacturer of the iGate 2.0 hasn't added min/max value it's falling back to default
return Platform.SENSORProposed fix
Can we change the logic slightly to this?
I can open a PR. I don't think this breaks any of the other entities during discovery. One edge case to consider is parameter
160303writable: true,enumValues: [],unit: "",minValue: null,maxValue: nullvalue: ""My proposal above requires
self.unit(truthy), so an empty unit "" evaluates to False — this parameter is correctly skipped and stays asPlatform.SENSOR