Hi,
When displaying values ending on .0 (e.g. 23.0) Pimatic is displayed it as 23; however 23.1 is displayed as 23.1
Please implement a way to use a kind of template for number annotations
Thanks in Advance
-
Template for number annotations
-
@Was-Verzachter im just curious but why do you want this? What are you trying to do?
-
@Gleno0h Hi Glen, I have several temperature sensors and I like to Have a nice overview in Pimatic.
By now it looks like:
Outside 23.7°C
Pool 23°C
Living 22.4°CIn config.json:
{ "id": "mqtt-esp04-temperature-sensor", "name": "Outside", "class": "MqttSensor", "attributes": [ { "name": "Temperature-sensor", "topic": "/esp04/BME280/Temperature", "type": "number", "unit": "°C" } ] },
I would like to have:
Outside 23.7°C
Pool 23.0°C (mind the .0)
Living 22.4°CYes, I can get 23.0 by using a string instead of a number in the device definition (config.json), however then I lose the °C
In config.json:
{ "id": "mqtt-esp04-temperature-sensor", "name": "Outside", "class": "MqttSensor", "attributes": [ { "name": "Temperature-sensor", "topic": "/esp04/BME280/Temperature", "type": "string", "unit": "°C" } ] },
Regards,
Was -
@Was-Verzachter ah, so its a cosmetic issue you have run in to.
I dont know anythong about the devices you posted but maybe this would work:
Create a variable to hold your 23.0 value, try via a rule to populate that variable.
A variable can also hold the °c symbol, as you can see in my screenshot:
After that just create a variable device with that variable and use a string interpolation:
"Pool: {$YourTempVariable}°c"
Ignore the variable $DeepSleep, its a test variable for me hehe
Result:
This could be a temporary fix for your problem and the dev’s can see if they are going to change it