Homematic variables / sysvar, show values in Home Assistant

Hello all,

I have defined a whole series of variables in my Homematic instance (rainfall, gas consumption, presence, etc…) and I would like to display the values of these variables in Home Assistant.

To do this, I have integrated my Homematic in hass.io in configuration.yaml as follows:

# HomeMatic configuration details
homematic:
  interfaces:
    wireless:
      host: 192.***.***.***
      username: "username"
      password: "password"

Also in the configuration.yaml I then try to pass the values as follows:

  - platform: template
    sensors:
      gasyesterday:
        value_template: "{{ state_attr('homematic.ccu3', 'gasYesterday') | int }}"
        unit_of_measurement: 'm³'
        friendly_name: "Gasverbrauch Vortag"

But it doesn’t work … HA only returns “not available” for the respective sensors.

Do any of you have an idea what I am doing wrong?

Thanks and greetings
Frank

I would recommend to switch to custom_homematic. There you can simply enable variables as entities in the GUI without the need for any templates.

I have already thought about it, but I have many dashboards and views configured for different parts of our house, for different devices and the different users. Switching to custom integration would mean rebuilding everything from scratch … and I really try to avoid that.