##################################################
# Core Configuration
##################################################

default_config:

homeassistant:
  name: !secret name
  external_url: "http://anneclaus.duckdns.org:8123"
  internal_url: "http://dethlefsen:8123"
  auth_providers:
    - type: homeassistant
  customize: !include_dir_merge_named include/customize/
  latitude: !secret homeassistant_latitude
  longitude: !secret homeassistant_longitude
  elevation: !secret homeassistant_elevation
  unit_system: metric
  time_zone: Europe/Copenhagen
  country: DK
  allowlist_external_dirs:
    - /config
  media_dirs:
    local: /config/www/media

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 127.0.0.1
    - 10.0.0.142

logger:
  default: warning
  logs:
    custom_components: warning
    homeassistant.components.mqtt: error
    homeassistant.components.netatmo: error
    homeassistant.components.unifi: error
    homeassistant.components.discovery: error
    homeassistant.components.dlna_dmr: error
    async_upnp_client: error

recorder:
  purge_keep_days: 7
  auto_purge: true
  exclude:
    domains:
      - automation
      - updater
      - camera
    entity_globs:
      - sensor.*_linkquality
      - sensor.*_signal
      
zone: !include include/zone/zones.yaml


timer:
  indkorsel:
    duration: '00:10:00'

utility_meter:
  badevaerelse_nat_taendinger_daglig:
    name: "Badeværelse nat-tændinger dagligt"
    source: input_number.nattis
    cycle: daily


python_script:

frontend:
  themes: !include_dir_merge_named include/themes/

##################################################
# Integrations
##################################################

duckdns:
  domain: !secret duckdns_domain
  access_token: !secret duckdns_access_token

sonoff:
  username: !secret sonoff_username
  password: !secret sonoff_password
  default_class: light
  reload: always

google_assistant:
  project_id: esh-home-assistant-b5231
  service_account: !include SERVICE_ACCOUNT.json
  report_state: true

##################################################
# gardin-gruppe
##################################################


cover:
  - platform: group
    name: Alle gardiner
    entities:
      - cover.hojre
      - cover.midt
      - cover.syd
      - cover.venstre
      - cover.terrasse_dor    

##################################################
# Modular Includes
##################################################

template: !include_dir_merge_list include/templates/
group: !include_dir_merge_named include/groups/
mqtt: !include include/mqtt.yaml
sensor: !include_dir_merge_list include/sensors/
automation: !include_dir_merge_list include/automations/
binary_sensor: !include_dir_merge_list include/binary_sensors/
device_tracker: !include include/device_trackers.yaml
input_datetime: !include_dir_merge_named include/input/datetime/
input_number: !include_dir_merge_named include/input/number/
input_select: !include_dir_merge_named include/input/select/
input_boolean: !include_dir_merge_named include/input/boolean/
input_text: !include_dir_merge_named include/input/text/
command_line: !include_dir_merge_list include/command_line/
light: !include_dir_merge_list include/lights/
panel_iframe: !include_dir_merge_named include/panels/
script: !include_dir_merge_named include/scripts/
shell_command: !include_dir_merge_named include/shell_commands/
switch: !include_dir_merge_list include/switches/

browser_mod:


lovelace:
  resource_mode: yaml
  resources:
    - url: /hacsfiles/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js
      type: module
    - url: /hacsfiles/button-card/button-card.js
      type: module
    - url: /hacsfiles/custom-gauge-card/custom-gauge-card.js
      type: module
    - url: /local/community/apexcharts-card/apexcharts-card.js
      type: module
    - url: /local/community/lovelace-mushroom/mushroom.js
      type: module
  dashboards:
    lovelace:
      mode: yaml
      filename: ui-lovelace.yaml
      title: Home
      icon: mdi:home-assistant
      show_in_sidebar: true
