Node red and ecobee

i have a device call climate.my_ecobee_2

i have to acces the attribute hvac_action: idle

how can i do that in node red

thanks

I have been running Ecobee with Home Assistant and Node-red for many years. Until a few weeks ago, I was on an original Ecobee (separate thermostats and controller). [October lost access to Ecobee API, Replaced with Ecobee3 Light] API worked with the old developer access key. Last week, the API key stopped working. Scrambling to regain API access I found out that the HA HomeKit device integration worked without any IOS devices. I updated my HA and Node-red configurations and scripts to work under the new HomeKit device integration API access.

The HA HomeKit device integration is a local/real-time API access. This is how all integrations need to work. (Old integration was extremely slow if it reported status changes at all)

Note: There is one major difference between the old Ecobee HA integration and the HA HomeKit device integration. When the system is set to Fan On, Fan Auto (circulation min/Hr) or during cooldown after heating the HA HomeKit device integration does not show that the fan is active in hvac_action (hvac_action: idle). This is a major issue for me.

New to you issue of accessing hvac_action from Node-red.
This got me at first but it is not too difficult. You need to create a sensor in the sensor section of your configuration.yaml (I use a separate sensor.yaml file).


########### Home Thermostat Current State #############
  - platform: template
    sensors:
      home_thermostat_current_state:
        friendly_name: 'Main HVAC State'
        value_template: "{{ state_attr('climate.home_2', 'hvac_action') }}"

Note: My entity for the Ecobee3 is climate.home_2

In this case, the sensor will look like in the HA STATES listing:

sensor.home_thermostat_current_state 	idle	friendly_name: Main HVAC State
Main HVAC State

In Node-red:
Use the home assistant “events state” node to get the current status of sensor.home_thermostat_current_state

In my configuration -

Name: Main State
Server: Home Assistant
Event ID: sensor.home_thermostat_current_state
State Type: String

Alternatively the trigger node makes it pretty easy to trigger from an entity’s attribute. Place the main entity at the top. Then below you can add conditions by clicking the add button, bottom left.

Set the second drop down to property, which is another term for attributes. You can either target the new state of the attribute or the old. Here we use both because we want the change to “heating”.

Thank you for this example. I was trying to figure out how to fix an air conditioner freeze up. A few times each summer our AC evaporator coils will freeze up with ice. If this happens the AC will run forever and the house heats up. The solution is to turn off the AC for 30 minutes, but keep the fan running. With your example, I was able to capture the event where the system switched from not cooling to cooling. I then started a timer. The Ecobee keeps sending random updates, so I put in a pause test to prevent the timer from resetting if the new_state == old_state for hvac_action. I set the timer for two hours. If the AC unit was still running, I changed the mode from cool to off. Then after 30 minutes changed the mode back to cool and restarted the program mode.

1 Like