Hello gentlemen,
i’m trying to implement an automatic fahrenheit/celsius conversion in my device handler that would use the user set field ${location.temperatureScale} to determine the selected temperature scale and change the tile’s unit label to the selected one?
I managed to do the conversion of data without any problems, but when it comes to changing how the unit label looks i’ve had no luck. All the device handler examples i could find that convert the temperature value don’t actually display °C or °F but instead just use the label to display the degree sign:
label:'${currentValue} °'
In my device handler event i return the map object as usual, the data in the received command does get displayed, but no luck with the temperature unit change:
Does anyone have any tips regarding this or got something similar to work?
1 Like
tgauchat
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
2
If it is just for display Tile, you can add a new composite String Attribute that holds the “numeric value + units” and update this whenever the temperature is updated… Perhaps?
Thanks for the offer Robin, if you could PM the code for your device handler it’d be much appreciated since it seems i fubar’ed rule smartApps by sticking the unit tag inside the value.