Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 99284

Remove unit from json formatted value?

$
0
0

@Blueman2 wrote:

I have a z-wave device that has an attribute value which includes unit of measure embedded in the value. I use the following to extract the value into an entity:

sensor:
  - platform: template
    sensors:
       pool_solar_temp:
         friendly_name: "Solar Temperature" 
         value_template: '{{ states.sensor.zw_044_21_solar_temperature.attributes.temperature }}'
         unit_of_measurement: '°F'

I get a result of 109°f°F

I know I can just remove my °F and get 109°f, but I want to have all my temperatures in °F format.

I want to strip the “°f” from the value. How do I do that?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 99284

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>