Malformed data with new labs trigger

Any suggestions to fix error Message malformed: required key not provided @ data['options'] for this automation created with the new labs purpose-specific trigger for climate setpoint changed? I tried both with an area and with the climate thermostat entity, same error with both.

1000012068

Yaml it generated, that has error when trying to save

alias: Notify temp setpoint
description: ""
triggers:
  - trigger: climate.target_temperature_changed
    target:
      floor_id: ground
conditions: []
actions:
  - action: notify.notify
    metadata: {}
    data:
      message: Temp set
mode: single

The minimum amount that I can get working (notification works, but not the temp trigger):

alias: Notify temp setpoint
description: ""
triggers: []
conditions: []
actions:
  - action: notify.notify
    metadata: {}
    data:
      message: Temp set
mode: single
triggers:
  - trigger: state
    id: ground
    entity_id: climate.target_temperature

id is not really needed, it will show as the name of the trigger in the UI. Verify the name of your entity. Actually in such situations you may want to use the UI to set up automations, it can be really helpful.

I did use the UI, as you can see in the gif.

This is using UI to pick the device rather than the area
1000012072

alias: Notify temp setpoint
description: ""
triggers:
  - trigger: climate.target_temperature_changed
    target:
      entity_id: climate.thermostat
conditions: []
actions:
  - action: notify.notify
    metadata: {}
    data:
      message: Temp set
mode: single

And I tried without an ID, same problem

alias: Notify temp setpoint
description: ""
triggers:
  - trigger: climate.target_temperature_changed
conditions: []
actions:
  - action: notify.notify
    metadata: {}
    data:
      message: Temp set
mode: single

Did you try the “state” version that I posted an hour ago? Is your thermostat really called climate.target_temperature-changed?

Please, don’t upload dynamic pictures - they are unreadable.

Thank you for helping me work through it! I agree the gifs aren’t great; forum won’t let me upload a video, and my phone won’t let me generate longer than a 6-second gif. So I have to run the screen recording at 2x to turn it into a gif.

I have figured out a workaround; apparently the Above/Below properties are not optional. UI doesn’t make that clear, and I want all temp setpoint changes to trigger a notification while I’m still figuring out how to automate home temps with vanilla Home Assistant. So that if I make an automation that messes up the home temp, I’ll know right away and can go figure out what I messed up. But I’ve set the limits to ±100 degrees, so that’ll probably catch everything anyway.

I did not want to try your state version, because it’s YAML I do not understand and suspect may be wrong, and ultimately would rather use UI anyway. My reason in sharing YAML was to help other people see what exactly UI had made for me without needing screenshots of the multiple different UI screens. I suspect it may be wrong because ground is a floor, but you labeled it as id. And I don’t think climate.target_temperature exists per developer tools, either as a state or an attribute. I do see attribute climate.temperature in my developer tools, but I know attributes often can’t be called the same way as states so I don’t really know if that’s equivalent in the context of automation.

climate.target_temperature_changed is what got filled out automatically by the new Purpose-Specific Triggers UI when I selected my thermostat. I guess this is the github pull request for the new trigger type, although it doesn’t mean much to me Add trigger climate.target_temperature_changed by emontnemery · Pull Request #159434 · home-assistant/core · GitHub, and here’s what developer tools shows when filtered for “climate”

Here is the final working YAML generated by UI. It works with either entity_id, or floor_id, or both.

alias: Notify temp setpoint
description: ""
triggers:
  - trigger: climate.target_temperature_changed
    target:
      entity_id: climate.thermostat
      floor_id: ground
    options:
      above:
        number: -100
        active_choice: number
      below:
        number: 100
        active_choice: number
conditions: []
actions:
  - action: notify.notify
    metadata: {}
    data:
      message: Temp set
mode: single

Oh funny, I don’t even need the above/below settings either. I just have to enable the disable the option, and then it lets me save. I see the YAML has an added options: {} that is not initially added by the UI.

alias: Notify temp setpoint
description: ""
triggers:
  - trigger: climate.target_temperature_changed
    target:
      floor_id: ground
    options: {}
conditions: []
actions:
  - action: notify.notify
    metadata: {}
    data:
      message: Temp set
mode: single

All Labs features are experimental and not for production use. They can be incomplete, broken, and/or not work the way you think they should.
Turning them off is always an option.

If you have feedback or questions about them, the place to get help is Home Assistant

2 Likes