Is there something wrong with this automation as I have checked and checked again and I can’t seem to see the issue but there is one as it’s not hitting the script.
This is the error:
Error while executing automation automation.front_door_open. Service not found for call_service at pos 1: Unable to find service script/scan_bt_arrive
This is my automation code:
Located automation/security/front_door_open.yaml
alias: 'Front door open'
initial_state: 'on'
trigger:
- platform: state
entity_id: binary_sensor.front_door
to: 'on'
action:
- service: script.scan_bt_arrive
the same is also true of groups, shell_commands, panel_iframes, etc.
However, automations, switches, sensors, etc are written as lists and each entry starts with a dash:
sensor:
- sensor1:
config...
- sensor2:
config...
Don’t ask me why there is a difference because I have no idea. I’m sure it has something to do with Python dicts and lists but other than that I’m clueless on what the distinction would be between the different types.
So to split things from your configuration.yaml that are named you have to use “!include_dir_merge_named” & for things that are lists you have to use “!include_dir_merge_list”. I don’t think those things are interchangeable just by adding or removing the dashes. I don’t think…
I was sure that I set the format right, but clearly not. I don’t suppose you know of a guide to use of !include I’ve read up on yaml and the use of !include but clearly I don’t have a full understanding of it as I know there are multiple uses of !include