Hi all
Guess this is very simple coding for 90% of all of you out there, but ive tried sevaral hours and days and cant get this to work.
I get the error “duplicate key” because I have automation typed twice. But I need to include the automation.yaml to get the automation blueprints to work right? They get installed there when I program them…
I also need the automation for my IHC an bluesound typed in the configuration.yaml… I cant seem to move any of the two so I dont get the duplicate message… Attached the configuration.yaml below. it is the automation section the troubles me, where the two automations appear after each other.
Please help?
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
# Text to speech
tts:
- platform: google_translate
script: !include scripts.yaml
scene: !include scenes.yaml
**[u]automation: !include automations.yaml[/u]**
**[u]automation:[/u]**
# Test notifikation
- alias: test knap ved terrasse dør
trigger:
platform: state
entity_id: binary_sensor.kontakt_ved_terrasse
to: 'on'
action:
service: notify.mobile_app_pixel_7_pro
data:
title: Knap ved terrasse dør
message: Knap ved terrasse dør blev tændt
mode: single
# alarm! notifikation
- alias: alarm aktiv
trigger:
platform: state
entity_id: binary_sensor.alarm_aktiv
to: 'on'
action:
service: notify.mobile_app_pixel_7_pro
data:
title: Alarm!
message: Alarm er aktiv
mode: single
# Hoveddør åben notifikation
- alias: doer aaben
trigger:
platform: state
entity_id: switch.dorlas_40760667
from: 'on'
to: 'off'
action:
service: notify.mobile_app_pixel_7_pro
data:
title: Dør låst op
message: Hoveddør blev låst op
mode: single
# IHC controller setup
ihc:
- url: 'http:xxxxxxx
username: xxxxx
password: xxxxxx
auto_setup: true
info: true
switch:
- id: 40774930
name: Hjemme
- id: 16072978
name: Doere_laast_op
- id: 2556946
name: Nat
light:
- id: 37703442
name: Hoensehus
binary_sensor:
- id: 811612
name: kontakt_ved_terrasse
- id: 40678162
name: alarm_aktiv
# Bluesound setup
media_player:
- platform: bluesound
hosts:
- host: xxxxxx
name: bluesound_stue
- host: xxxxxxx
name: bluesound_badevaerelse