Turn_on cannot be called without entity_id

I’d like to run this script inside an automation.

luci_letto_sunrise:
  alias: Sunrise Luci Letto
  sequence:
    - service: light.turn_on
      entity_id: group.luci_camera_letto
      data:
        transition: 1
        brightness_pct: 1
        rgb_color: [0,255,0]
    - delay: 00:00:30
    - service: light.turn_on
      entity_id: group.luci_camera_letto
      data:
        transition: 9
        brightness_pct: 10
    - delay: 00:00:10
    - service: light.turn_on
      entity_id: group.luci_camera_letto
      data:
        transition: 10
        brightness_pct: 20

I call it with:

  action:
    - service: script.turn_on
      data:
        entity_id: script.luci_letto_sunrise

From the log I see that the automation is executed, but I get:

ERROR (MainThread) [homeassistant.components] homeassistant/turn_on cannot be called without entity_id

I can’t find where the error is!
Thanks.

I don’t think that error is related to the script and automation you’ve posted.

Grep your configuration files for

service: homeassistant.turn_on 

And find the one that doesn’t have an entity_id attached.

Call a script like:

action:
  - service: script.luci_letto_sunrise

or without the data like this

- service: script.turn_on
  entity_id: script.ios_update

Removing the “data” line made the work!
Than you! :grinning: