SOLVED: Automation to Notify attribute change

Hi there,

I need your help with an automation.
I have an thermostat wich can be set to an specific temperature.
What I want to achieve is a notification when the temperature is changed.

In my case the entity_id is: “climate.oeq0239467”
The state ist alway set to “manual”
The attribute I want to monitor is called: “temperature”

I tried it with:

    - action:
      - alias: notify_tempchange
        data_template:
             title: >
               Bedroom
             message: >
               Temperature is set to {{ states.climate.oeq0240841.attributes.temperature }}°C
        service: notify.kodi
      alias: tempchange
      condition: []
      trigger:
      - platform: template
        value_template: '{{ states.climate.oeq0240841.attributes.temperature < 26 }}'

But this only works once in the beginning. I gues because all other times, the temperature never goes above the value of 26.
How can I trigger every change of the attribute?

I would be so thankful for any solution.

Hi @Mike_i386, i would make a Template Sensor with the attribute.

sensor:
  - platform: template
    sensors:
      climate_temp:
        friendly_name: "Climate Temperature"
        unit_of_measurement: '°C'
        value_template: "{{ states.climate.oeq0240841.attributes.temperature }}"

then you can use the state trigger

automation:
  trigger:
    platform: state
    entity_id: sensor.climate_temp

If you omit any value in the state trigger, it triggers on every state change.

EDIT: Didn’t know this myself.

Triggers when the state of tracked entities change. If only entity_id given will match all state changes, even if only state attributes change.

Maybe you can use only the climate.oeq0240841 as trigger. Give it a try.

Thank you so much VDRainer, thats what I was looking for!

Writing the value of the attribute into a template sensor and than monitor that sensor works perfectly!

I didn’t try using only the climate.oeq0240841 as a trigger since it has so many attributes which changes all the time…

Again, thank you for you help.