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

Changing class of a template

$
0
0

Hello all,

Complete noob with templates, I would like this template

sensors:
garage_doors:
value_template: “{{
(states(‘sensor.temp_exterieur’) | float(0) < 0) and
(is_state(‘binary_sensor.some_sensor’, ‘on’)
or is_state(‘binary_sensor.some_othersensor’, ‘on’)
or is_state(‘binary_sensor.nspanel_left_button’,‘on’))
}}”

to show Open or Closed instead of true or false, tried with changing class with :

device_class: door

but with no sucess, i am unable to find the proper syntax to do like this example I found:

value_template: >-
  {% if value is equalto 'false' %}
    Closed
  {% else %}Open
  {% endif %}     

Pointers are appreciated!

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 108170

Trending Articles



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