Need help setting up automation

Hi,
I’m setting up an automation, with multiple condition and one of them is giving me issue

for hardware part, I’m getting 4* aqara E1 thermostat and a Moes zigbee thermostat for central control
each E1 is in a different room
here is the whole flow to better understand the goal :

room 1 :

  • radiateur off
    OR
  • radiator on AND sensor temperature above target temperature

here I only describe 1 room as all 4 are exact same configuration
when the 4 room condition are confirmed, then, it shut off the central thermostat to avoid boiler overheating

my issue is :
I’m trying to setup a template condition with the following template content :

  - condition: template
    value_template: >-
      {{ states("sensor.0x00158d00091ad768_temperature") >
      state_attr('climate.0x54ef4410006ffff2', 'temperature')}}

this take my sensor temperature to check if it’s above my aqara E1 goal temp
but I’m not really sure what I’m doing and it don’t really look to work,

can you help me please ?

Thanks

  - condition: template
    value_template: >-
      {{ states("sensor.0x00158d00091ad768_temperature") | float(0) >
      state_attr('climate.0x54ef4410006ffff2', 'temperature')}}

wow ! that was fast and exactly what I was doing wrong !
Thanks a lot !

1 Like