Automation - homeassistant.turn_on vs switch.turn_on

Hello,

I was trying this afternoon to get an automation working. The config was:
Action type: Call service
service: switch.turn_on
service_data:
{
“entity_id”: “switch.lights_a”
}
and this would not work at all.

Testing with the developer tools worked well. In the log file, however, there were 2 line: one with “homeassistant” as domain and another just beneath with “switch” as domain (between squares).

Then this made me try to change the service to “homeassistant.turn_on” and then it worken.

So, can somebody explain the difference?
What if I want to change a dimmer light?

TIA

Mario

PS: just a small remark on automation interface: the save button only appears when selecting the actiontype, not when changing the other fields.

You could try light.turn_on instead :slight_smile: