Thermostat Controller - Home Assistant not able to turn off!

I am using Thermostat Controller and am sending the controller thermostat to home assistant. I can control it normally for every function except for 'off'. I can see in the logs that HE is receiving the command but it never turns off.

If I send the controlled thermostat to HA, it turns off as expected, the problem is with the Thermostat created by Thermostat Controller. It will turn off as expected in HE as well.

Very similar to this issue.

Any help would be appreciated!

OK, I was able to determine that when HA sends the 'off' command, it is turning off the switch in the virtual thermostat created by the app. Now to find a way to disable the switch.

The on/off commands don't do anything to the Controller Thermostat (the one created by the app). Those commands are defined as part of the Thermostat Capability, but in this case have no meaning.

The Controller Thermostat can be turned off by setting its Mode to 'off' (as opposed to 'heat', 'cool', etc.). This is the way most thermostats work. There are pull downs for Mode, such as this one:

Thank you for the response. What I mean is I have the thermostat shared with home assistant using Home Assistant Device Bridge in HPM. When I set the mode in Home Assistant, everything works except for ‘off’. When the off command is sent from home assistant, it turns off the switch instead of the thermostat. (This is in all likelihood NOT the fault of thermostat controller and more to do with how HADB sends/receives commands from home assistant as the logs are the same for ‘off’ as they are for ‘cool’ and ‘hot’)

I have gotten around this by setting up two automations on HE which turns the switch on when the thermostat is on and turns the thermostat off when the switch is off. So it SEEMS to be working consistently for now.

I wonder if there’s a way to edit the device driver (or use a new driver) that doesn’t create that switch. Or I could try working with the developer of HADB and see what needs to be changed there.

Since I have you and it seems like you are pretty involved with the thermostat controller app, is there a way for thermostat controller to take over control of the thermostat if I manually adjust the thermostat at the physical device?

What I mean is that if I turn on the thermostat or adjust the temperature at the physical device, the controller will see that and then adjust the controller thermostat to match.

Or do I need to use automations to do that?

No, there is not.

It should be able to use setMode command on the Controller Thermostat. This is how it sets it to heat or cool, and it should set it to off that way too. The switch should not be used for this.

I'm not sure what switch you are talking about. The HADB Generic Component Thermostat does not have the switch capability and whatever mode is chosen in HA (including the "off" mode) is reflected back in HE thermostat mode.

Edit: There was not many types of thermostat tested. Perhaps yours could reveal an unforseen case. Logs would be appreciated.

1 Like

My apologies as I was mistaken, I’m using maker API to share the thermostat with home assistant, not HADB.

The switch is actually created by the thermostat controller app driver.

@bravenel from what I can tell, the switch is what turns off because there isn’t a button to turn off the thermostat. I’m certain if the switch didn’t exist and there was a button for off, it would work as intended.

1 Like

Nope, the driver does not create a switch. I has switch capability, so it offers switch commands on and off. But, as explained above, they don't do anything.

Sounds to me as though you are perhaps confused about what is going on with TC. Again, if you want to turn the Controller Thermostat off, that can be done via Maker API by issuing setMode("off") to the Controller Thermostat device.

This makes more sense now. May I suggest reaching out to @jason0x43 on the HA forum for help with that integration.

2 Likes

I'm not confused. There is a switch in the virtual thermostat device. I'm aware it doesn't do anything. What I'm saying is that when I set the thermostat in HA to off, it is trying to turn off that switch. That's whats happening and its happening because that switch is there (doesn't happen when I share the real tstat with the same exact method which doesn't have a switch). The log is Executing command: off on device: Thermostat. The commands are the same for all the other modes and those work because, I assume, there is a 'button' for those options. See the picture and notice the button options for the switch and all other modes except off.


I don't know the workings under the hood but that's what I'm seeing and the experience I'm having (and per the link in the OP, I'm not the only one). It's all good as I was able to make a workaround that was reliable. But I am moving back to a thermostat integration in HA which will work in a way that is easier to set up automatons to allow me to change settings on the thermostat and it reflect in the virtual thermostat.

Thanks for your help!

Apologies for any confusion. The switch state displayed on the Device Details page should reflect the thermostat's mode. Both Hubitat and Home Assistant follow the standard approach of turning off the thermostat by setting its mode to "off." In Home Assistant, you need to use the climate.set_hvac_mode as the action, with "off" as the hvac_mode within your automation. This command aligns with the "off" thermostat mode shown in the above shared image.

2 Likes

I had all my Virtual Thermostats created in HE and shared in HA via Maker. They were working fine but I as I started to use HA more for dashboarding I realised that I could not change the HE Thermostat to Off from within HA.

As a work around I now have a whole bunch of Helper Thermostats in HA which I share back to HE which adds some complexity but achieves the right outcome.

When I had it set up originally though (HE Thermostat shared to HA), I never used the switch On/Off functionality in HA

image

I've only ever used the Off command in the dashboard (below), I remember seeing the command in the HE logs (so the off command defo came through to HE) but it would not control the Thermostat as expected.

Each time Off is selected the HE thermostat turns back on all by itself

Which Hubitat integration are you using? You can easily test that Maker API is running correctly from any browser. Just use: http://[yourHubIP]/apps/api/[MakerAPIappID]/devices/[DeviceID]/setThermostatMode/off?access_token=[yourtoken] and observe what happens.

If the thermostat mode changes to off and stays off, then the problems is on the other side. If the mode changes back as you describe, then the problem is on our side. In my testing I was unable to replicate the issue.

1 Like

I'm using this integration in HA

And Maker in HE

I configured your address to control the thermostat and it did turn it off.

I went back to HA and changed the mode back and forth from Heat and Off, Only the Heat command was in the logs of the Thermostat itself.

I turned on logging in Maker, turned the device to Off in HA and reviewed the HE logs - the off command did come through to HE but still didnt change the HE Thermostat or appear in the logs of the HE thermostat

So looks like @jason0x43 mapped the off action for climate.set_hvac_mode from Home Assistant to the /off Maker API command instead of /setThermostatMode/off. We can make a change on our side to compensate for the oversight. Will see what we can do :wink:

3 Likes

We will add the one line of code so that command off() results in command setThermostatMode("off"). This will be in Release 2.4.1, now in beta.

4 Likes

Thanks so much everyone. Really appreciate it :pray::slightly_smiling_face:

Great to here! Thanks everyone!