home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.19k stars 30.21k forks source link

ecobee integration missing current HVAC mode #120976

Open sltam opened 3 months ago

sltam commented 3 months ago

The problem

ecobee integration missing current HVAC mode (e.g. that the last automation set via "Climate: Set HVAC mode"). It represents what we ask the thermostat should do, i.e. "heat_cool", "heat", "cool", "off". This is different from hvac_action which is what the thermostat decided to do based on the current HVAC mode, the current temperature, fan settings, etc.

What version of Home Assistant Core has the issue?

core-2024.6.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ecobee

Link to integration documentation on our website

https://www.home-assistant.io/integrations/ecobee

Diagnostics information

Developer > States > climate.ecobee says:

hvac_modes:
  - heat_cool
  - heat
  - cool
  - "off"
min_temp: 7
max_temp: 35
target_temp_step: 0.5
fan_modes:
  - auto
  - "on"
preset_modes:
  - away
  - home
  - Peak 1
  - Peak 2
  - AM Off Peak
  - sleep
  - PreSleep Fan
  - away_indefinitely
current_temperature: 28.2
temperature: null
target_temp_high: null
target_temp_low: null
current_humidity: 47
fan_mode: auto
hvac_action: idle
preset_mode: Peak 1
fan: "off"
climate_mode: Peak 1
equipment_running: ""
fan_min_on_time: 0
icon: mdi:home-thermometer-outline
friendly_name: ecobee Thermostat
supported_features: 411

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 months ago

ecobee documentation ecobee source

bjpetit commented 3 months ago

I believe this is a function of the base climate component rather than the ecobee integration. The hvac_mode is not exposed as state attribute, but rather the base state of the climate entity. On the developer->states page you should see the current hvac_mode value in the middle state column of the climate.ecobee entity.

sltam commented 3 months ago

I see! I couldn't find a suitable place to retrieve this info because I already had it added to my graph. Just it doesn't show up as an entry above the graph because "climate.ecobee" itself has a numeric value (of the current temperature) so it's inside the graph itself.

If I need to plot "cool" above the graph, looks like I just need to copy the value to a template sensor, and then add it to the graph. Just like what I did to add "cooling" to the chart.

I suppose then this issue is moot. Except, why do we have to make it so difficult? Isn't it more convenient to users if the individual values are exported as separate entities?

knwpsk commented 1 month ago

I'm struggling with some of this too.

The main "state" property of the device seems to be the hvac mode. In a template: {{ states.climate_ecobee.state }} I get one of these: "heat", "cool", "heat_cool" etc

I find that a little bit misleading; I would expect the main state of the device to be the current action ("heating", "cooling"). But that is actually in the hvac_action property: {{ staes.climate_ecobee.attributes.hvac_action }}

I can work with that.... but the documentation page really doesn't explain it well. So, my **sugggestion #1 is that the documentation needs to be improved about this.


Then, I'm trying to create an automation that will trigger when the "mode" changes. That is, if {{ states.climate_ecobee.state }} changes between Heat, Cool, Heat_Cool, Off, etc. But it's not working. It never triggers -- or it triggers constantly.

When I write the trigger like this:

  - platform: state
    entity_id:
      - climate.ecobee_loft
      - climate.ecobee_family_room
      - climate.ecobee_frog
      - climate.ecobee_office
    enabled: true

then it triggers every time any attribute changes -- like, every time the current temp changes, etc. That's not what I want.

When I write the trigger like this:


  - platform: state
    entity_id:
      - climate.ecobee_loft
      - climate.ecobee_family_room
      - climate.ecobee_frog
      - climate.ecobee_office
    enabled: true
    attribute: state```

... then it never triggers. I suppose "state" isn't an "attribute" on the object hierarchy, so the trigger thinks I'm asking for something that doesn't exist. 

Also, when troubleshooting the first of my two trigger methods (without the attribute:state line), I looked at the automation's "trigger" object. It's weird. The from_state field is empty with a bunch of commas; and there is no to_state field at all. Is that a problem with the integration's event publishing?