I hope this is the right category in this forum to poste my question, else please move this subject to the related category.
My question:
I have one thermometer (from Tuya) that is not really working with home Assistant, but instead of reading the current temperature I can see some corresponding values.
Let me give more detail:
The device entity id is: climate.thermostat
The attribute where I see values is named: current_temperature
But as explained in “current_temperature” I see only value like 3.8 which give 19°C (on the device screen), 3.9 gives 19.5 etc…
What I want to do is create an new entity or senssor from the the above attribute and make a table of correspondance like this:
3.8 ->19 °C
3.9 → 19.5 °C
4 → 20 °C
4.1 → 20.5 °C
4.2 → 21 °C
4.3 → 21.5 °C
4.4 → 22 °C
4.5 → 22.5 °C
4.6 → 23 °C
4.7 → 23.5 °C
etc…
By doing this I can use this new sensor / entity to get the real value of the temperature as I can read it on the screen of the physical device.
I hope my issue is clear for you, else please tell me and I’ll give you more details.
Error message:
Invalid config for [compensation]: [Room_temperature_wall_mounted] is an invalid option for [compensation]. Check: compensation->compensation->Room_temperature_wall_mounted. (See /config/configuration.yaml, line 100).
THanks the correction is done. Now just for my understanding, is this supposed to creat an entity named: room_temperature_wall_mounted, where the converted values will be stored ? if this is the case I can’t see this in the “STATUS” tab ?
Maybe this might help you, I have a separate “sensor” file
because 19/3.8 = 5, 19.5/3.9 = 5 and 20.5/4.1 = 5. So there is no reason to create a compensation table in my opinion.
But now that it’s done it won’t make any difference, unless you believe it will go above or below your current range.
Thank you for your answer. Making a template sensor was my first idea and your code seems to be what I wanted to do. Just one question, where and how to enter the conversion value into the code you have given above ?
Umm… it is there. All you need to do is copy it to your configuration and reload template entities.
When that is done it should be visible in states tab