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

Round() function no longer rounding

$
0
0

@zoogara wrote:

I have a template sensor:

    # reads 1 hPa high compared to local stations
  - platform: template
    sensors:
      outside_pressure_msl:
        friendly_name: "Outside Air Pressure MSL"
        unit_of_measurement: hPa
        value_template: "{{ ((states('sensor.outside_air_pressure')|float * (1 - (0.0065 * 175) / (states('sensor.outside_temperature')|float + (0.0065 * 175) + 273.15)) ** -5.257) | round(1)) - 1  }}"
        icon_template: mdi:gauge

This used to work fine, after the latest update however I get this result:

Screenshot 2020-03-17 17.33.36

Has templating changed? This used to work, nothing has changed in the template. Can anyone spot an error that was “fixed” in the latest update?

Posts: 6

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles