#Can't change thermostat temperature from automation?

1 messages · Page 1 of 1 (latest)

stoic kayak
#

I have just recently added a zigbee thermostat to my setup, and while I can change the temp from the dashboard I do not seem to have an option to do so from an automation. I can set the mode there and enable temp hold but can't actually change the temp.

Its worth noting, I also couldn't change it from the dashboard until i went into z2m and changed it there. After doing that home assistant must have realized that was an option.

I am using the visual editor to make this.

forest flicker
#

Is the thermostat actually showing up as a Climate entity? (I.e. its name should be climate.something) If so you should be able to set the temperature using a Climate action: In the visual editor, go Add Action, under Actions select Climate, then there should be a "Set target temperature" action available.

stoic kayak
#

It does show as climate.something, but the climate action doesnt seem to have anywhere to actually put in a number

forest flicker
#

try using the "choose entity" control rather than "choose device"

stoic kayak
#

Looks identical...

#

Maybe its like an entity naming issue?

forest flicker
stoic kayak
#

Or endooint or whatever? This device calls it something else

forest flicker
#

the name doesn't matter as long as the type is right. It seems like z2m isn't correctly telling home assistant that the entity allows setting the temperature, so the home assistant UI thinks it shouldn't show the temperature field.

stoic kayak
#

Yeah which is odd as it does show in the dashboard

forest flicker
#

can you check the state inside home assistant? Go to Developer Tools, "States" tab, then use the filter to find the thermostat.

#

Also, it's possible that if z2m did something that changed the entity's properties after the entity was created, then restarting home assistant might fix it.

stoic kayak
#

HA restarted, no change.

Here is states tab.

#

My only thought it somehow HA is not just recognizing that target_temp_high/low the same way everywhere. So the dashboard sees it OK but automation tabs dont?

forest flicker
#

That looks like a Z2M bug. The supported_features value there is missing support for TARGET_TEMPERATURE, so home assistant thinks that there is no support for setting the target temperature.

#

hmm. it does indicate support for TARGET_TEMPERATURE_RANGE tho.

#

so it should be showing two temperature fields when you configure the set temperature action, one for the low target temperature, one for the high target temperature

stoic kayak
#

Is there a way to just set it using this field name explicitly (even if via yaml)? It doesnt surprise me if its a z2m issue, this is some weird thermostat i got off amazon that was made by xfinity (for some reason)

forest flicker
#

should be able to use the target_temp_high and target_temp_low field names in the yaml

stoic kayak
#

The good news is i can set it via the dashboard so its 90% there at least

stoic kayak
#

'''

  • id: set_target_temp_high_64
    alias: Set target temp high to 64
    description: "Set heat to 64"
    trigger: []
    condition: []
    action:
    • service: climate.set_temperature
      target:
      entity_id: climate.0x000d6f00031bbd4f
      data:
      target_temp_high: 64
      mode: single

'''
(Hopefully thats a code block)

Tried adding this to the end of my automations.yaml but it does not seem to actually run

Opening it in the editor and running the action gives:
some but not all values in the same group of inclusion 'temperature' @ data[<temperature>]. Got None

Ive never done HA yaml before so this could be anything. It was AI generated too so who knows

stoic kayak
#

Fixed it i think. I needed target_temp_low too

triggers: []
conditions: []
actions:

  • target:
    entity_id: climate.0x000d6f00031bbd4f
    data:
    target_temp_high: 75
    target_temp_low: 64
    action: climate.set_temperature
    mode: single
rain jasperBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

marsh heath
#

The z2m states dialog shows that your climate entity is in heat mode and doesn’t even support heat_cool, yet the HA dialog is giving you two temperature setpoints which only happens if you are in heat_cool mode. And you are only required to provide both setpoints when you are in heat_cool mode. (See https://www.home-assistant.io/integrations/climate/#action-climateset_temperature)

What does the physical device show? Is it in a mode where it will do either heating or cooling based on the temperature?

stoic kayak
#

Its in heat mode, but it supports both

#

Idk what the deal is but it works now. I just have to use YAML for it

#

And i must always give both data points

#

I think the device itself does have an auto mode but its not something i am using and my setup is janky enough i would rather not touch it