#httpswww home assistant

1 messages · Page 1 of 1 (latest)

glossy harness
#

sorry I don't understand what i'd need to do here none of the examples explain taking a figure and removing the (-) from the returned value and making it a sensor in its own right? (end game all I want is to drop the (-) on the sensor to then pull it into the energy screen.

simple lotus
#
  - sensor:
      - name: "Average temperature"
        unit_of_measurement: "°C"
        state: >
          {% set bedroom = states('sensor.bedroom_temperature') | float %}
          {% set kitchen = states('sensor.kitchen_temperature') | float %}

          {{ ((bedroom + kitchen) / 2) | round(1, default=0) }}```

This example, instead of doing the logic it wants to do, take the average of the 2 values, just get the 1 value and multiply it by `-1` to make it positive
glossy harness
#

i'll have a look in a few mins to see if I can make it work