cyberjunky / home-assistant-custom-components

My custom components for Home Assistant
MIT License
71 stars 19 forks source link

Branderinfo Toon #26

Closed Dennisd80 closed 5 years ago

Dennisd80 commented 5 years ago

Hi, i'm searching for a way too include the burnerInfo state of my rooted toon. I saw in your toon_google that you already pull the data, but not sure how it is displayed so i can use it.

cyberjunky commented 5 years ago

It's exposed with an attribute of the climate.toon. you can create a sensor with a template like this:


    sensors:
      toon_driewegklep:
        friendly_name: 'Driewegklep'
        value_template: >-
          {% if is_state_attr('climate.toon','burner_info', 0) %}
             Neutraal
          {% elif is_state_attr('climate.toon','burner_info', 1) %}
             CV
          {% elif is_state_attr('climate.toon','burner_info', 2) %}
             Warm Water
          {% endif %}

And then display it as a badge, sensor, or in lovelace custom thermostat as a sensor.
Dennisd80 commented 5 years ago

Thanks, sorry for being a noob ;) But i have copied the exact code in my configuration file and i do get a sensor with driewegklep, but unfortunately without any output of number or word.

cyberjunky commented 5 years ago

Check on your dev-state page how your toon device is called (mine is climate.toon) and replace the name in the template sensor. Also see if you have the burner-info attrib with numeric value on that page. image

Dennisd80 commented 5 years ago

Succes, thanks