not true, some devices auto assign sensor names and this is one of them. The unfortunate thing here is that you cannot use the direct access to the state machine objects when the object_id starts with a number. He’ll have to use the states method.
I’ve just got a Moes Zigbee thermostatic radiator valve (TRV). I use ZHA to manage the zigbee devices on my network. The TRV is reporting the temperature correctly but it is setting the temperature x10 in the TRV compared to the temperature in HA. The image below illustrates it:
The temperature in the room is correctly 20 but the target temperature in the TRV is 52, not 5.2 as shown in HA.
Can I use the techniques described in here to correct the set point? What would I have to do? What platform: should I use? Where should it go, in what file?
In case anyone else is interested, I’ve explained the workaround I’ve implemented below. However, I still would prefer to fix the problem at source but I’ve no idea how.
First, I’ve configured a few templates as follows so I have the right values and with easy to remember names. Note the “* 10” to get the right set value from the trvs.
I use node red and use service calls to set the trv temperature. Fortunately, there’s no limit on the setting so I can set them to, say, 2 deg, which becomes 20 deg at the trv. One is in my study, one in the bedroom. So I set the study one to 20 deg during the weekdays, and 12 otherwise. The bedroom trv I set 20 early morning and late evening, 12 otherwise.
However, to see the setting and to override them, I use a grid card with two button cards, that call a service to set the trvs to set low and high temperatures, and two gauge cards to show the setting and reading. The gauge cards use the sensors I’ve set up above. This is what they look like (I need to understand how to theme them to make them look better):
I have the same problem, but in my case the Thermostat connected with MODBUS and coefficient that should be applied to value is 5.
So 20.5 C at Thermostat shown as 4.1 C at home assistant.
Read setpoint: 4.1 * 5 = 20.5 C
Set setpoint: 20.5 / 5 = 4.1 C
Is it possible to have TWO coefficients: one for read value, one for set value back?
I set up templates for both the reading and the setting. I only needed a factor (x10 in my case) for the setting but you could use a different factor for the reading. But remember, if you do anything to, say, set the temperature using automations or lovelace, you’ll have to use the raw values.
In the unlikely even anyone is following my ramblings, it looks like recent HA updates have resolved this issue and now the temperature readings and settings are correct.
in my case in the configuration.yaml for a luftdaten sensor i swapped them of place
value_template: “{{ value_json.sensordatavalues[0].value | round(2) | float(0) - 12 }}”
it didnt take the config as correct with float in front of round, this for a negative12° correction