Ecobee through homekit - read the temperature that someone sets

I wanted to know what entity, if any, that reads the temperature that is set on the Ecobee thermostat? I am using Ecobee through HomeKit. The call service action equivalent is climate.set_temperature. Is there an entity I can use to trigger if someone sets the thermostat lower than I want it. I know I can change the range but I dont want it always set to a certain range.

You can automate this via the “temperature” attribute (or target_temp if in auto mode). Here’s mine for someone that turned the heat above 76. Note that if you’re using the ecobee smart thermostat and you’re interfacing via the Ecobee integration (not just via built-in HomeKit) then the Ecobee will show up in HA as an airplay speaker; thus you can write a script such that the thermostat itself can tell the person that they turned it up too high… which is fun.

- id: 'id_4_1'
  alias: 'heat set too high'
    - platform: template
      value_template: "{% if (state_attr('climate.ecob', 'temperature') | int(72) ) >76 %}true{% endif %}false"
    - platform: template
      value_template: "{% if (state_attr('climate.ecob', 'target_temp_low') | int(72) ) >76 %}true{% endif %}false"
    - condition: template
      value_template: "{{ states('climate.ecob') != 'cool' }}"
    - service: script.hvac_preset_home
      continue_on_error: true
    - service: script.say_temp_set_high
      continue_on_error: true
    - service: notify.my_phone
        message: 'a monitored automation ran: turned ecob temp down'
        title: 'Karen says:'
            badge: 0
            thread-id: HA Alerts

ok, great. thank you! just so I understand the template portion, this measurement is the temperature some has set, not the measured temperature in the room, correct?

Right. Go to Developer Tools → States and scroll down to climate.whatever and you will see all the attributes listed on the right. current_temperature is the temp in the room. The target temp attributes differ depending on the HVAC mode.

What did I do wrong? I get this:

Here is what I altered the template to:

{% if (state_attr('climate.thermostat_2', 'temperature') | int(72) ) < 77 %}true{% endif %}false

also the thermostat is set to 75

Arggghh sorry about that it should look like this:

{% if (state_attr('climate.thermostat_2', 'temperature') | int(72) ) < 77 %}true{% else %}false{% endif %}

awesome thank you! and FYI, I have a google speaker near the thermostat and I will be doing this -

service: tts.google_translate_say
  entity_id: media_player.hallway_speaker
  message: >-
    {{ states.climate.thermostat_2.attributes.temperature }} degrees?  Do you
    think we are made of money?

which will dynamically state the temperature that was set. I like your thinking!