Want to add transition to automation

I can’t seem to add anything to this in the ‘Edit as YAML’

device_id: 6d5ac995e3e34543aba1b9e3f6fa4194
domain: light
entity_id: light.shelf_light
type: turn_on

Adding trasition, or data transition errors

Message Malformed: extra keys not allowed @ data[data]

Use the states page in developer tools.
or use the helper in automation to see how it does it.

Do not use device triggers and actions if you’re using yaml, they should have never been introduced (or certainly shouldn’t populate with ‘normal’ automations) and cause far too much complication.

action:
  service: light.turn_on
  data:
    entity_id: light.shelf_light
    transition: 30 
1 Like

Is that why they never work reliably for me.

Yeah, I don’t see the need for all of the extra “fluff” in the code.

Taking the posted example:

the device_id is completely useless and provides no useful information to the user because it’s nowhere close to being human readable.

I fail to see any benefit in needing to introduce the “domain:” key into the code since it’s already there and obvious from the “entity_id:”

IMHO, they just made what was supposed to “be easier” more complicated and harder to read/edit.

1 Like

So I’m hearing the Edit as YAML, is a red herring. Whats another way to accomplish this?

Using the code that I posted.

I assume that i edit the automations file directly and replace the acrion portion of the entry from the gui? Or do i need ro build it from scratch?

Yeah, just cut out the old action block, paste mine in (preserving the relative indentation), save and reload.