Please help me understand syntax of EspHome yaml file

I know I am going to get a hard time for asking this but here we go:

Would you please help me understand the difference between the ’ - <<: !include’ and ’ - !include’ in the code below? I couldn’t find documentation that explain the difference.

Thanks in advance.

sensor:
  - <<: !include common/sensor/uptime.config.yaml
  - <<: !include common/sensor/wifi_signal.config.yaml
binary_sensor:
  - <<: !include common/binary_sensor/connection_status.config.yaml

switch:
  - !include common/switch/restart_switch.config.yaml
2 Likes

The <<: are YAML anchors, see here for more info.

The only stupid question is one you won’t or are afraid to ask
:+1:

Always do a search, but if it’s still confusing : -
Ask it anyway :smiley: