Thermostat-Card not working with KNX-Climate heat_cool_state_address

Hi all,

I am having a little trouble in understanding how to get the Thermostat-Card working properly with an KNX-Climate heat_cool_state_address.

I am using two 8 channel MDT heating actors to control my underfloor heating. I have configured every actor to support heating and cooling, which works fine from the technical perspective.

I can configure every actor to work either in heating or in cooling mode (I am having an 2 pipe system).This means that every actor with 8 channels can operate in heating or in cooling mode. That means that I cannot (I even think that this makes no sense in my case) configure every channel to work in heating or cooling mode. So, heating or cooling is an option actor wide not channel wide.

If I use the Thermostat-Card as far as I understand it supports the KNX-climate option heat_cool_state_address. I would expect that the card pools the state from the group address but this does not work.

The heating/cooling configuration is done using an boolean object which I can set to 0 or 1 (knx standard). I can control the heating or cooling state using lovelace but the Thermostat-Card does not reflect the correct state.

- name: climate_control.bathroom
  temperature_address: '12/0/6'
  setpoint_shift_address: '7/0/6'
  setpoint_shift_state_address: '7/0/6'
  setpoint_shift_mode: 'DPT9002'
  target_temperature_state_address: '7/1/6'
  setpoint_shift_min: -6
  setpoint_shift_max: 6
  temperature_step: 0.5
  operation_mode_address: 7/3/6
  operation_mode_state_address: 7/3/6
  heat_cool_state_address: 1/1/27
  controller_modes:
    - Heat
    - Cool

Here you can see that I set the heat_cool_state_address to the address which represents the object to control this behaviour.
The Thermostat-Card does not show the cooling state. I have to tap/click on it.

Again, technically everything is working but I am trying that the card reflects to correct status of heating or cooling.

Any ideas what I am doing wrong or where my misunderstanding is?

You can just use the same GA for every channel then.

Errors in Log? Read-Flag set? Is the actuator sending something to the bus, is HA receiving it? Logs for the KNX integration

Are you using a switch entity to set this? If yes, is it receiving the state correctly (eg. after restart of HA)?
because:

You did not set a heat_cool_address, but only a state_address. So I guess nothing is ever sent to the bus when changing this form HA. heat_cool_address

I have an template binary_sensor

- binary_sensor:
    - name: heater_is_heating
      state: >
        {{ states('input_boolean.heater_is_heating') }}
      icon: >
        {% if is_state("input_boolean.heater_is_heating", "on") %}
          mdi:fire
        {% else %}
          mdi:ice-cream
        {% endif %}

with determines it’s “state” from an input_boolean helper. I have integrated that in lovelace:

entities:
  - entities:
      - icon: 'mdi:fire'
        tap_action:
          action: call-service
          service: input_boolean.turn_on
          service_data:
            entity_id: input_boolean.heater_is_heating
      - icon: 'mdi:ice-cream'
        tap_action:
          action: call-service
          service: input_boolean.turn_off
          service_data:
            entity_id: input_boolean.heater_is_heating
    entity: binary_sensor.heater_is_heating
    name: Heizmodus
    show_state: false
    type: 'custom:multiple-entity-row'
show_header_toggle: false
type: entities

1
So the binary_sensor determines it’s state from the input_boolean and changes the icon according to to it.
Besides that I have two automations which are setting the actor to cooling

- id: '1622576931380'
  alias: Heater - Set mode to cooling
  description: Setzt die Heizung in den KĂźhlmodus
  trigger:
  - platform: state
    entity_id: input_boolean.heater_is_heating
    to: 'off'
  condition: []
  action:
  - service: knx.send
    data:
      address:
      - 1/1/27
      - 1/1/28
      payload: 0
  mode: single

or heating

- id: '1622576849442'
  alias: Heater - Set mode to heating
  description: Setzt die Heizung in den Heizmodus
  trigger:
  - platform: state
    entity_id: input_boolean.heater_is_heating
    to: 'on'
  condition: []
  action:
  - service: knx.send
    data:
      address:
      - 1/1/27
      - 1/1/28
      payload: 1
  mode: single

All this is working fine and in ETS I can see that the mode is switched and the actuators respond properly to the mode and the target temperature.

So, this binary_sensor is my heater wide option to control for heating or cooling. The addresses 1/1/27 and 1/1/28 are read flag enabled

but the information about the cooling or heating state is not pushed on the bus.
I was expecting, that because the KNX-Climate configuration has an state_address for this that the Thermostat-Card can poll the state and display it accordingly.

Have you tried reading it from ETS?
Please try to answer my other questions above related to logs.

It should be able to read. It will definitely not send anything.
But using just a state address is not really the intended way and I gues you are the first one to test it.
Again, we need logs. From xknx and maybe also from ETS group monitor when starting HA and changing Heat/cool state.

Remove this, it should be detected automatically. If not it is an indication for a bug.

Does it work when you set a heat_cool_address? Is there a specific reason for you not to set one?

Yes, I can read it from ETS. I can read it directly from ETS, I can read it using an KNX.binary_sensor and I can read it using the KNX read-service.

ETS Bus logs from HA starting procedure:



HA log with KNX-Debug enabled: https://pastebin.com/zBj6itvK

If I remove this the Thermostat-Card only show’s the “Heating”-Icon

I can set this option and then I can klick the heat or cool icon and the mode-change will be send to KNX. This is not an option for me because I dont want to control this behaviour from every channel. I want to control it from a central place and my expectation was that the corresponding state will be shown correctly. If the card does not work this way, my bad luck

1 Like

Is the state read from bus properly when you also use heat_cool_address? Are the controller_modes detected without having them in config?

I just had a look. You need to set heat_cool_address in order for controller_mode to work.
If you don’t want to be able to set it from the card just use any non-used dummy address (or a internal address heat_cool_address: "i-heat-cool dummy"). But it will display the last set mode until the next state update - so about one hour after you clicked it (e.g. by accident).

I’m not sure the HomeAssistant Climate Entity supports read-only modes at all.

- name: climate_control.bathroom
  temperature_address: '12/0/6'
  setpoint_shift_address: '7/0/6'
  setpoint_shift_state_address: '7/0/6'
  setpoint_shift_mode: 'DPT9002'
  target_temperature_state_address: '7/1/6'
  setpoint_shift_min: -6
  setpoint_shift_max: 6
  temperature_step: 0.5
  operation_mode_address: 7/3/6
  operation_mode_state_address: 7/3/6
  heat_cool_state_address: 1/1/27
  heat_cool_address: 1/1/27
  controller_modes:
    - Heat
    - Cool

This leeds to that I can control heating or cooling mode by clicking on the corresponding icon of the Thermostat-Card which then shows the state that I have clicked. But all other Thermostat-Cards having the same heat_cool_address are not switching over the mode.

In example: The heater is in cooling mode. I restart HA and can see that the mode is written on the bus. All cards are not updating the mode. Every card shows that it is in heating mode. If I now click cooling mode on of the cards (having 1/1/27 configured) nothing happens which is expected, because the actor is already in heating mode. But nevertheless all others cards having the same address configured are not switching over to cooling. If I now click the heating icon, the actor switches to heating, the Card, I clicked on, switches it’s mode. All other cards are still on heating (which was expected). I can only click on every card to set it’s appropiate state.

If I delete controller_modes while letting heat_cool_address configured the card detects both modes but I is still unable to read the correct value and display it accordingly.

The controller_modes config is meant to remove unwanted modes from the Entity so they can not be selected.
Modes that are not automatically detected, but manually added will not be sent or read from the bus. (They will just be visible in the UI without function).

So you would have to add heat_cool_address to every climate entity.

This is what I have done. I deleted controller_modes and added heat_cool_address on every climate entity. Same behaviour. Mode is not read

I tried to set up 2 climate entities sharing the same heat_cool addresses on my test instance. I can see a GroupValueRead to the heat_cool_state_address (unanswered as it is only using a dummy address) and the two entities sync their mode immediately when one is changed (and thus sends a telegram).

Here you can see the response of the actuator (I don’t know why the Read requests are not shown here).

In your log on line 482 there is a telegram incoming on 1/1/27 but before there were some unanswered GroupReads for that address.
Not sure what is going on here. ¯\(ツ)/¯

Update: when I add operation_mode_address I can reproduce the error. Lets see.

1 Like

Found and fixed this bug. It will need a new release of xknx and this to be included in HA.

Let’s see, maybe we can also support using only the state address in hvac_action.

1 Like

I really appreciate your help. Thanks

1 Like

Read only hvac_mode:

The bugfix for hvac_mode is already merged and will be included in 2021.6.2 :tada:

1 Like

I installed 2021.6.2 and everything is working fine. The heating/cooling mode is shown correctly for every channel instantly after I changed it. No problems with HVAC Modes. Loving it :heart_eyes: