#No target set
1 messages · Page 1 of 1 (latest)
Can you share complete yaml?
alias: Home Switch Automations
description: ""
triggers:
- domain: mqtt
device_id: bc1aa8e4fe7562007040119ec686b71a
type: action
subtype: single
trigger: device
alias: Home Switch - Single
id: Home Switch - Single
conditions: []
actions:
- data:
entity_id: input_select.home_status
option: "On"
entity_id: input_select.home_status
alias: "Home Status: On"
action: input_select.select_option
mode: restart
Having the entity under data is a bit of an old think. I think it does still work but looks like the GUI has a buggy implementation for it.
Change it to:
alias: Home Switch Automations
description: ""
triggers:
- domain: mqtt
device_id: bc1aa8e4fe7562007040119ec686b71a
type: action
subtype: single
trigger: device
alias: Home Switch - Single
id: Home Switch - Single
conditions: []
actions:
- data:
option: "On"
target:
entity_id: input_select.home_status
alias: "Home Status: On"
action: input_select.select_option
mode: restart
The target is defined twice. Once under data and once on root level of the action
That last one is really outdated, it still works, but I haven't seen it in years
I guess the main reason for the error is that it's defined two times now
Ah! Thanks 🙂
data:
option: "On"
target:
entity_id: input_select.home_status
alias: "Home Status: On"
action: input_select.select_option
worked
I've actually noticed it in a fewplaces
data: {}
entity_id: climate.mitsubishi_hvac
action: climate.turn_off
entity_id: input_boolean.motion_sensor_status
action: input_boolean.turn_on
changed them:
action: input_boolean.turn_on
metadata: {}
target:
entity_id: input_boolean.motion_sensor_status
data: {}
and it works
I wonder when it will break one day
I'm getting those errors for this use case:
@eternal beacon data_template had been deprecated for a long time now...
I don't think it's really in the way in the backend so will probably keep working. But I don't think the frontend has any priority to support it when they change things around.
As addition to the comment of @spark flower , you can just use data instead of data_template
And target also accepts templates
Thanks for the feedback
Changing data_template to data gives this in the visual editor, and the [No target set] error still shows