#No target set

1 messages · Page 1 of 1 (latest)

ionic oxide
#

I am getting this error message

#

but I do have targets:

spark flower
#

Can you share complete yaml?

ionic oxide
#
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
spark flower
#

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
ebon blaze
#

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

ionic oxide
#

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

eternal beacon
#

I'm getting those errors for this use case:

spark flower
#

@eternal beacon data_template had been deprecated for a long time now...

spark flower
ebon blaze
eternal beacon
#

Thanks for the feedback
Changing data_template to data gives this in the visual editor, and the [No target set] error still shows

ebon blaze
#

You removed the entity_id key

#

And you now put it under data

#

It's either

action: scene.turn_on
target:
  entity_id: scene. whatever 

Or

action: scene.turn_on
data:
  entity_id: scene. whatever 
#

Not

action: scene.turn_on
data:
  target: scene. whatever 
eternal beacon
#

OK, I changed the YAML to your second option and that shows as the 2nd screen shot in the GUI:

#

But the [No target set] error still displays:

#

Changing the YAML to your first option got rid of the error: