Two ways to set a switch : is there a difference?

Hi,

With automation UI, I can set a switch following two different ways:

  • Action type: Call service
  • Service: switch.turn_on
  • Name of entity to turn on: switch.my_plug

or

  • Action type: Device
  • Device: my plug
  • Action: Turn on my plug

I presume there are cases where a way is better or may be it is the only way. Have you an example ?

If you are manually creating automations in yaml, use the first example you posted. The second example is what the UI generates and it’s not intended to be manually used.

I am not talking about manual yaml configuration. Both cases describe how I fulfilled the fields into the automation UI. So my question remains : why two UI ways to do the same ?

old way verse new way. People had issues understanding the old way (call_service) method, so a new automation method was born for people who didn’t understand.

There is no difference other than how you want to tailor your automations.

1 Like

I am disappointed, I hoped a real difference :disappointed_relieved:
Thank you for the help !

Can I ask why?

It was a joke, sorry.
Thanks again.