[group.set_visibility] is an invalid option for [automation]

I want to toggle the visibility of a group with this code (in automation.yaml):

- alias: camera_lenovo_uit
  trigger:
    - platform: state
      entity_id: input_boolean.notify_home
      from: 'off'
      to: 'on'
  action:
    - service: group.set_visibility
      entity_id: group.cameras
      data: 
        visible: false
````
When I check the configuration however I  get this error : 
Invalid config for [automation]: [service] is an invalid option for [automation]. Check: automation->trigger->0->service.
I cannot see what is wrong.
  1. You should use Lovelace
  1. group.set_visibility isn’t a service.

group.set_visibility is a service…

Screenshot%20from%202019-01-10%2015-06-57

Well, don’t know what did the trick but it works now.
I commented the code once, reloaded configuration, un-commented the code and checked configuration.
Seemed to be ok, and reloaded configuaration.

Everything works no.

Thank you for your answers

Did you maybe change the false to False - that’s the only difference I can see to an action I’ve been using for months.

Sorry about that. I didn’t see any documentation on that.