Skip to content

✨ New Features

Choose a tag to compare

@cataseven cataseven released this 02 May 12:24
2a63c0b

✨ New Features

value variable in templates

You no longer need to repeat the entity name inside value_template. A new value variable is automatically available, holding the current state of the entity (or the attribute value, if attribute is set).

Before:

- entity: sensor.newgaragesensor_garage_temperature
  value_template: "{{ states('sensor.newgaragesensor_garage_temperature') | round(1) }}"
  name: Garage
- entity: sensor.newgaragesensor_garage_humidity
  value_template: "{{ states('sensor.newgaragesensor_garage_humidity') | round(1) }}"
  name: Garage RH

After:

- entity: sensor.newgaragesensor_garage_temperature
  value_template: "{{ value | round(1) }}"
  name: Garage
- entity: sensor.newgaragesensor_garage_humidity
  value_template: "{{ value | round(1) }}"
  name: Garage RH

The value variable also works inside visible_if:

- entity: sensor.garage_temperature
  visible_if: "{{ value | float > 30 }}"
  value_template: "{{ '%.1f °C' | format(value | float) }}"