cyberjunky / home-assistant-toon_climate

This component provides a climate device for rooted Toon thermostats.
MIT License
32 stars 8 forks source link

Add sensors for heating, warm water and humidity #11

Closed X1pheR closed 4 years ago

X1pheR commented 4 years ago

The modules all work perfectly. But could you add some sensors to be used in automation? For heating so you know if it is actually heating or not. This is displayed on the toon as an additional icon when it does. Same for warm water. If you use warm water an additional icon is displayed on the toon. Since I have a toon 2 which has a humidity sensor it would be great if this was displayed as sensor in ha.

cyberjunky commented 4 years ago

You can create any sensor from any attribute yourself using template sensors, like so: Change 'climate.toon' to name of your device.

sensor:
  - platform: template
    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 %}

About the humidity from Toon 2, can you send me sample output? Just goto this url with your browser and save the output:

http://toon_ip:toon_port/happ_thermstat?action=getThermostatInfo

X1pheR commented 4 years ago

Sorry for the long delay. It seems that the humidity is not in the sample output. See below. I tried finding out how to get it but have not been successful so far. Maybe you might know alternate ways. And thanks for the custom sensor tip! So when it's 2 you can now distinquish cv and warm water?

{"result":"ok", "currentTemp":"2121", "currentSetpoint":"1500", "currentInternalBoilerSetpoint":"6", "programState":"1", "activeState":"2", "nextProgram":"1", "nextState":"1", "nextTime":"1594011600","nextSetpoint":"1800","randomConfigId":"1804289383","errorFound":"255","connection":"0","burnerInfo":"0","otCommError":"0","currentModulationLevel":"0"}

cyberjunky commented 4 years ago

It seems the humidity data is not exposed in the data. And yes the water heating status should match. I close this for now, if I come across more information I let you know.