Greeting to all !!
I’ve been using HA for some time and I think I’m an average user.
I have the following problem (which I already solved), but I think it should be possible to do it in a more efficient way.
It usually happens that I have an operational sensor and I need to change some characteristic.
For example
A temperature sensor that has wrong temperature readings and I have to raise it by 5 degrees
An energy sensor that I must multiply by an adjustment factor
A volume sensor that I need to convert from cubic feet to cubic meters.
A sensor delivers a number in string format and I must convert it to a number.
In all cases, what I do is create a new sensor through a template, which contains the necessary adjustment, which generates a large duplication of sensors.
That’s the primary way of adjusting an existing sensor’s value. To minimize the impact of duplication, you can hide the original sensor from the UI. This feature (hide an entity) was introduced in version 2022.4.0.
the “sensor.smappee_sensor_battery_1” is a string and if you want to add something to it, you have first to convert it to an integer or a float… That’s the way it is… So if you want to add 8 to the sensor with a value of 76, you have to do the following: