Change the state of Generic Thermostat through Node-Red to update its buttons

Hello,

I have a generic thermostat card that is used in parallel with a BroadLink IR Blaster and there’s a small issue in this setup: (in my case it is used for a cooler, and it has a snowflake instead of the flame)

Screenshot from 2020-10-07 17-28-22

Let’s say I turn on the AC via Siri/Lovelace UI… the node-red flow checks the status of the entity and based on that, the IR Blaster sends the specific command to turn on the AC, the AC turns on and the generic thermostat switches to Cooling (the snowflake turns blue) - Same thing applies for the “turn off” (the snowflake turns grey) - everything fine till now.

Here’s the tricky situation:

I’ve set up some other node-red flows, that turn on/off the AC based on some constrains (ex: when I am away, and the AC is still on, turn it off by sending IR command).

In those situations, when the AC is turned on/off by the IR Blaster, via node-red, the generic thermostat card does not update the snowflake/turn off buttons - and I am unable to use Siri anymore (because it doesn’t know in what state it is) - I need to go to Lovelace and manually turn on/off…

So I was thinking if there’s a way to manually override the snowflake/turn off buttons of the generic thermostat card whenever the IR Blaster sends those commands. It might be related to those two attributes of the entity, but I am not sure.

I tried changing the “state” of this entity through the developer tools tab and it works as it should: when it’s state is set to “cool”, the snowflake turns blue, the AC turns on, and vice-versa for “off”. I’ve also tried parsing a msg.payload with {“state”:“off”} (WHICH WORKS) but it clears all other attributes and the current temperature, slider, etc disappear (until the HA entity refreshes and brings those attributes back)

What flow should I use, and what should it do, that whenever the IR Blaster turns the AC on or off, that entity updates as well?

Thanks!

Instead of sending off to the AC, increase/decrease the temp depending on the season.

That’s not what I am trying to achieve here. I want to update it’s buttons based on specific actions (turn on/off) so it can then be used with Siri or directly from the Lovelace UI.

Oh so you need send the command to turn off the thermostat climate.turn_off, not directly to the ir.

2 Likes

Well… that’s something that I missed… Will try this as soon as I get home, and come back with an answer. Should work!?

Even though it is virtual, all the existing climate service calls are available. Just as if it were a real thermostat.

Can this climate.turn_off be called for a specific entity? Or does it shutdown all climate entities?

The entity defined in the call service node only.

It worked like a charm! The buttons turn blue/grey based on the turn on/off commands. Now I need to update my flows, to remove the IR command that was manually sent. Thanks @Mikefila

It could be nice having an override mode like this situation:
I want to shut down the heater system during I’m charging my electricity car.
And I want to force OFF and being impossible to turn it on manually on the HA card. In the meantime I want to inform the user with a specific info on the HA card like “Car is charging”.
Only way should be stopping the charging process of the electricity car to remove the override of the heater system.

Today it’s only possible manually:

  • Put of the heater system
  • Start charging your car
  • Pray no one put on the heater system after you
  • Wake up yourself once your car is fully charged
  • Put ON heater system

Download and install spook. You will have a service call to disable a device, the thermostat. You would need to go to the integration page to re enable it or spook has a service call to enable the device as well.

You could also put the thermostat card in a conditional card that is only shown when an input boolean is on. Boolean off card hidden. You could have another card, like a markdown card, show when the boolean is off “Car is charging”.

1 Like

Great, thanks for the tips !!!