Some Hama Thermostat wont show their temperature

Hi guys

I’m new to home assistant and just created a floor plan. In that I want to see the current temperature of the thermostat.
So I created a template with this:

template:
  - sensor:      
      - name: "Temperatur Vorderhaus Bad"
        unique_id: "template_sensor_temperatur_vorderhaus_bad"
        state_class: measurement
        device_class: temperature
        unit_of_measurement: '°C'
        state: "{{ float(state_attr('climate.climate.bad_papa_mama', 'current_temperature')) | round(1) }}"

template:
  - sensor:      
      - name: "Temperatur Wohnzimmer"
        unique_id: "template_sensor_temperatur_wohnzimmer"
        state_class: measurement
        device_class: temperature
        unit_of_measurement: '°C'
        state: "{{ float(state_attr('climate.thermostat_wohnzimmer', 'current_temperature')) | round(1) }}"

template:
  - sensor:      
      - name: "Temperatur Hinterhaus Bad"
        unique_id: "template_sensor_temperatur_hinterhaus_bad"
        state_class: measurement
        device_class: temperature
        unit_of_measurement: '°C'
        state: "{{ float(state_attr('climate.hinterhaus_bad', 'current_temperature')) | round(1) }}"

But now I saw that it only works with 2 out of my thermostats… they are all the same and I added them all the same way… ( imported from the tuya app ) so why are 2 of them working and the rest isn’t?

The temperature is also not showing in the entity - statistic tab except for the two working ones

Hi, welcome. In order to see what might be wrong, two things are needed. The first is that you show all three sensor configurations. The second is that you format your code by placing it within three backticks, as explained in point 11 of the below post. That is because indentation matters and your yaml is now not shown properly.

Okay I edited it and added the ‘’’ and the other two templates.

The first two are working the third one and all other following won’t.

When I go to settings - devices - entities and select the static tab of the thermostats there are also just two working. So the stats “current temperature” is only showen by two thermostats no matter if i use the templates in the config or delete them

You can only use the template: platform once, that is why the two below are ot working. (you should see errors in the log about this). remove the repeating template: lines and put all sensors below the first:

template:
  - sensor:      
      - name: "Temperatur Vorderhaus Bad"
        unique_id: "template_sensor_temperatur_vorderhaus_bad"
        state_class: measurement
        device_class: temperature
        unit_of_measurement: '°C'
        state: "{{ float(state_attr('climate.climate.bad_papa_mama', 'current_temperature')) | round(1) }}"
  - sensor:      
      - name: "Temperatur Wohnzimmer"
        unique_id: "template_sensor_temperatur_wohnzimmer"
        state_class: measurement
        device_class: temperature
        unit_of_measurement: '°C'
        state: "{{ float(state_attr('climate.thermostat_wohnzimmer', 'current_temperature')) | round(1) }}"
  - sensor:      
      - name: "Temperatur Hinterhaus Bad"
        unique_id: "template_sensor_temperatur_hinterhaus_bad"
        state_class: measurement
        device_class: temperature
        unit_of_measurement: '°C'
        state: "{{ float(state_attr('climate.hinterhaus_bad', 'current_temperature')) | round(1) }}"

This should work, assuming the climate entities work correctly. You can check this by looking in developer tools to see for the three climate entities if they all have the current_temperature attribute.

First off all thank’s for your realy fast answers

The entities are showen now but still not available…

Hvac_modes:
  - "off"
  - heat_cool
min_temp: 5
max_temp: 30
target_temp_step: 0.1
current_temperature: 22.1
temperature: 16
friendly_name: Zockerzimmer Schreibtisch
supported_features: 385

For all my other Hama thermostates it says “Null” on current temperature. And the thermostates that wont show the temperature have 0.5 target_temp_step. The ones showing the temp have a 0.1 step in the settings.

Then the problem is not in your templates, but in the integration that provides the climate entities. IEither the devices do not supply the information, or the integration fails to provide it. The only person that can fix that is the person that built the integration (assuming the data is there).

I do not know what integration it is, tuya devices can be all kinds of integrations.

Okay so I will try to integrate all my Thermostates again and hope that it was just a mistake from the import

That was what I was about to suggest. For zigbee or z-wave, reinterviewing or pairing again can sometimes help. Also, if it is either protocol, there’s also the question if you have enough router devices for a stable mesh.

For temperature though, the sensor inside a thermostat is not the best source. I’d consider buying separate temperature sensors that are in a representative place in the room.

I will try it tomorrow evening and report the results.

Yeah I know but this was the easiest already existing source for the temperature.

Bedtime for me too now. Good luck.

1 Like

Good morning

I found the mistake but still no idea how to fix it.

The working thermostates have zigbee module version 1.1.5 installed. The ones that aren’t working have version 1.0.3.

So I’m sure that’s the reason why the temperature date won’t be send

What do you get when you put that template in the developer tools - template?

I get NULL for the 1.0.3 Version and a normal value like 21,4°C for the other ones with the 1.1.5

It would actually help if you show your entity including entity’s name and its attributes. I mean original ones, not the template sensors that you are trying to create. If it is once an attribute, it should show up, no matter what version it is.
You must be doing something obviously wrong here.

In what kind of way can I show you the entity’s? Over the developer settings task?

Developer tools - states. You can list yours there.
Also then under template, just put in your template for each of the sensors. It shows output of the template right there. List entity name and attribute. Such as:

{{state_attr('climate.hinterhaus_bad', 'current_temperature')}}
{{states('climate.hinterhaus_bad')}}
.
.
.

List all 6

For the states:

That’s what I get for the TRV’s with the 1.0.3 Zigbee Module Version:

And that’s what I get for the TRV’s with the 1.1.5 Zigbee Module Version:

OK, at least it is obvious that your device is not exposing “current_temperature” attribute in older firmware. Now it is up to you to figure out if this is a bug, or is intended, and whether you can do something about it (such as update firmware, etc.)
And I am also sorry that i did not notice that you actually said that in the very first tab - that device is not exposing it.

Yes and i got no clue why that happens.
I wrote to Hama Support and they told me thats not possible to manual update the Firmware.

Guess the next step is to try bind them with ZHA and see if its just the Hama Bridge or the Tuya integration that fails to convert the temp out of the older firmwares

Just to give some update.
I just got my Smlight SLZB-06 and even for me who is not realy good in the use with Home Assistant the setup was easy ( with some Youtube Tutorials )
And now finally the Hama TRVs show all stats like Temperature!!, Child Lock, Battery Level etc…

Seems like the Hama Bridges or the Tuya Integration could not send the data