homeassistant:
  name: Sarah
  latitude: !secret home_latitude
  longitude: !secret home_longitude
  elevation: !secret home_elevation
  unit_system: metric
  time_zone: Europe/Sofia
  packages: !include_dir_named packages

#
# ─── HOME ASSISTANT COMPONENTS ENABLED ──────────────────────────────────────────
#

# https://www.home-assistant.io/components/config
config:

# https://home-assistant.io/components/http
http:
  login_attempts_threshold: 20

lovelace:
  mode: yaml
  resources:
    - type: js
      url: /hacsfiles/travel-time-card/travel-time-card.js
    - type: module
      url: /hacsfiles/lovelace-gui-sandbox/gui-sandbox.js
    - type: module
      url: /hacsfiles/lovelace-swipe-navigation/swipe-navigation.js
    - type: module
      url: /hacsfiles/lovelace-card-mod/card-mod.js
    - type: js
      url: /hacsfiles/light-entity-card/light-entity-card.js
    - type: module
      url: /hacsfiles/weather-card/weather-card.js
    - type: module
      url: /hacsfiles/custom-header/custom-header.js
    - type: module
      url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js
    - type: module
      url: /hacsfiles/mini-media-player/mini-media-player-bundle.js
    - type: module
      url: /hacsfiles/aftership-card/aftership-card.js
    - type: module
      url: /hacsfiles/config-template-card/config-template-card.js
    - type: module
      url: /hacsfiles/lovelace-fold-entity-row/fold-entity-row.js
    - type: module
      url: /hacsfiles/lovelace-dummy-entity-row/dummy-entity-row.js
    - type: module
      url: /hacsfiles/lovelace-slider-entity-row/slider-entity-row.js
    - type: module
      url: /hacsfiles/lovelace-text-input-row/lovelace-text-input-row.js
    - type: module
      url: /hacsfiles/text-element/text-element.js
    - type: module
      url: /hacsfiles/lovelace-battery-entity/battery-entity.js
    - type: module
      url: /hacsfiles/lovelace-multiple-entity-row/multiple-entity-row.js
    - type: module
      url: /hacsfiles/decluttering-card/decluttering-card.js
    - type: module
      url: /hacsfiles/lovelace-layout-card/layout-card.js
  dashboards:
    lovelace-yaml:
      mode: yaml
      title: YAML
      icon: mdi:home
      filename: ui-lovelace.yaml
    lovelace-floorlan:
      mode: yaml
      title: Floorplan
      icon: mdi:map
      show_in_sidebar: true
      filename: floorplan-lovelace.yaml

# https://www.home-assistant.io/components/logbook
logbook:

# https://www.home-assistant.io/components/map
map:

# https://www.home-assistant.io/components/system_health
system_health:

# https://www.home-assistant.io/components/updater
updater:
  reporting: false

# https://www.home-assistant.io/components/logger
logger:
  default: warning
  logs:
    homeassistant.components.shell_command: debug
    homeassistant.components.amcrest: error
    zigpy.util: error

#
# ─── INTEGRATIONS ───────────────────────────────────────────────────────────────
#

# https://www.home-assistant.io/integrations/discovery
discovery:
  ignore:
    - yeelight

# https://www.home-assistant.io/integrations/ffmpeg
ffmpeg:

# https://www.home-assistant.io/integrations/frontend
frontend:
  themes: !include_dir_merge_named themes

# https://www.home-assistant.io/integrations/calendar.google
# google:
#   client_id: !secret google_client_id
#   client_secret: !secret google_client_secret

# https://www.home-assistant.io/integrations/history
history:

# https://www.home-assistant.io/integrations/media_extractor
media_extractor:

# https://www.home-assistant.io/integrations/mobile_app
mobile_app:

# https://www.home-assistant.io/docs/mqtt
mqtt:
  broker: !secret mqtt_ip
  client_id: homeassistant
  username: !secret mqtt_username
  password: !secret mqtt_password

# https://www.home-assistant.io/integrations/notify
notify:
  - name: telegram
    platform: telegram
    api_key: !secret telegram_token
    chat_id: !secret telegram_georgi_chat_id

# https://www.home-assistant.io/integrations/plex
plex:
  host: !secret plex_host
  token: !secret plex_token
  ssl: true
  verify_ssl: false
  media_player:
    use_episode_art: true
    ignore_new_shared_users: false

# https://www.home-assistant.io/integrations/wake_on_lan
wake_on_lan:

# https://www.home-assistant.io/integrations/zeroconf
zeroconf:

# https://www.home-assistant.io/components/zone
zone:
  - name: Home
    latitude: !secret home_latitude
    longitude: !secret home_longitude
    radius: 20
    icon: mdi:home
  - name: Work
    latitude: !secret work_latitude
    longitude: !secret work_longitude
    radius: 60
    icon: mdi:worker

# https://www.home-assistant.io/integrations/zha
zha:
  usb_path: /dev/ttyUSB0
  database_path: /config/zigbee.db

#
# ─── PLUGINS ────────────────────────────────────────────────────────────────────
#

spotcast:
  username: !secret spotify_spotcast_username
  password: !secret spotify_spotcast_password

hacs:
  token: !secret hacs_github_token
  appdaemon: true

uilogs:
