Changing units for forecast

Hi guys! Thanks for all yalls help along the way.

So ive gotten my weather card up and im editing the friendly_names for my weather entities. But ive realised that the weather pressure is displayed in MBar and i want to see if i can change it to kPa. Is there a way to change this?

Is it changing something to mathmatically change it from MBar to kPa or a way to just get that unit from the server in the firt place? Am i even thinking in the right computer logic direction?

Only you can help.

Thanks!

You could do this with sensor templating if you know the conversion math. I’m sure there’s some relevant examples in the forums.

Template Sensors

owm_pressure_imperial:
    entity_id: sensor.owm_pressure
    friendly_name: 'Pressure'
    value_template: '{{ (states.sensor.owm_pressure.state | float * 0.0295299830714) | round(1) }}'
    unit_of_measurement: 'in'
owm_wind_speed_imperial:
    entity_id: sensor.owm_wind_speed
    friendly_name: 'Wind Speed'
    value_template: '{{ (states.sensor.owm_wind_speed.state | float / 0.44704) | round(1) }}'
    unit_of_measurement: 'mph'

Edit: Ooops, I didn’t mean to resurrect this. I saw it in suggested topics and was quick to jump on it since I just did this the other week.

1 Like