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
  allowlist_external_dirs:
    - /config/www/audio/youtube
    - /config

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

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

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

lovelace:
  mode: yaml
  resources: !include lovelace/resources.yaml
  dashboards:
    lovelace-home:
      mode: yaml
      title: Home
      icon: mdi:home
      show_in_sidebar: true
      filename: ui-lovelace.yaml
    lovelace-floorlan:
      mode: yaml
      title: Floorplan
      icon: mdi:floor-plan
      show_in_sidebar: true
      filename: floorplan-lovelace.yaml
    lovelace-main:
      mode: yaml
      title: Advanced
      icon: mdi:flask
      show_in_sidebar: true
      filename: advanced-lovelace.yaml
    lovelace-hallway:
      mode: yaml
      title: Hallway Dashboard
      icon: mdi:tablet-dashboard
      show_in_sidebar: false
      filename: hallway-lovelace.yaml

# 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.scrape.sensor: fatal
    homeassistant.components.waze_travel_time.sensor: error
    homeassistant.components.shell_command: error
    homeassistant.components.amcrest: error
    homeassistant.components.switch.pihole_temp_disable: error
    homeassistant.loader: 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

recorder: &recorder_config
  include:
    domains:
      - automation
      - binary_sensor
      - camera
      - climate
      - fan
      - input_boolean
      - input_datetime
      - input_number
      - input_select
      - person
      - sensor
      - weather
      - zwave
    entities:
      - device_tracker.carbon
      - media_player.living_room_tv
      - media_player.nvidia_shield
      - switch.camera
      - switch.desk_outlet
      - switch.pihole_temp_disable
      - switch.titanium

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

# https://www.home-assistant.io/components/logbook
logbook:
  include:
    domains:
      - sun
      - fan
      - light
      - input_boolean
      - climate
      - media_player
    entities:
      - media_player.living_room_tv
      - media_player.nvidia_shield
  exclude:
    entities:
      - input_boolean.sarah_talking

# https://www.home-assistant.io/integrations/media_extractor
# TODO: Add to media module
media_extractor:

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

# https://www.home-assistant.io/integrations/panel_iframe
panel_iframe:
  router:
    title: "Router"
    url: !secret router_url
    require_admin: true
    icon: mdi:router-network
  tautulli:
    title: "Tautulli"
    url: !secret tautulli_url
    require_admin: true
    icon: mdi:plex
  portainer:
    title: "Portainer"
    url: !secret portainer_url
    require_admin: true
    icon: mdi:docker
  tasmo_admin:
    title: "TasmoAdmin"
    url: !secret tasmo_admin_url
    require_admin: true
    icon: mdi:lightbulb-multiple

# https://www.home-assistant.io/docs/z-wave/installation/
zwave:
  usb_path: /dev/ttyACM1
  # device_config: !include zwave_device_config.yaml
