###############################################################################
# THE HOME ASSISTANT CONFIGURATION FILE - MOTHER OF ALL CONFIG FILES
# @Author   :   Mahasri Kalavala
###############################################################################
homeassistant:
  name: Home
  temperature_unit: F
  latitude: !secret home_latitude
  longitude: !secret home_longitude
  elevation: !secret home_elevation

  unit_system: imperial
  time_zone: !secret time_zone
  customize_glob: !include customize_glob.yaml
  customize_domain: !include customize_domain.yaml
  packages: !include_dir_named packages

  whitelist_external_dirs:
    - "/home/homeassistant/.homeassistant/www/downloads/camera/patio/"
    - "/home/homeassistant/.homeassistant/www/downloads/camera/garage/"
    - "/home/homeassistant/.homeassistant/www/downloads/camera/playarea/"
    - "/home/homeassistant/.homeassistant/www/downloads/camera/driveway/"
    - "/home/homeassistant/.homeassistant/www/downloads/camera/frontdoor/"
    - "/home/homeassistant/.homeassistant/www/downloads/camera/kitchen/"
    - "/home/homeassistant/.homeassistant/www/downloads/camera/frontroom/"

sun:
alexa:
config:
discovery:
  ignore:
    - homekit

# shopping_list:

octoprint:
  host: !secret octoprint_ip
  api_key: !secret octoprint_key

homekit:
  autostart: true
  filter:
    include_domains:
      - alarm_control_panel
      - light
      - switch
      - input_boolean
      - camera
    include_entities:
      - binary_sensor.back_door_sensor_sensor
      - binary_sensor.aeotec_zw120_door_window_sensor_gen5_sensor
      - binary_sensor.single_car_garage_door_tilt_sensor_sensor
      - binary_sensor.two_car_garage_door_tilt_sensor_sensor

mobile_app:

# map:
# updater:
# logbook:
# history:
# recorder:
#   db_url: !secret my_sql_url
# influxdb:
#  host: 192.168.1.125
#  include:
#    entities:
#      - sensor.dining_room_thermostat_temperature
#      - sensor.downstairs_multi_sensor_temperature
#      - sensor.front_room_multi_sensor_temperature
#      - sensor.guest_bedroom_multi_sensor_temperature
#      - sensor.tv_multi_sensor_temperature

websocket_api:
python_script:
logger: !include logging.yaml

zeroconf:
#owntracks:
system_health:

life360:
  accounts:
    - username: !secret life360_username
      password: !secret life360_password
  circles:
    include: [Family]

mqtt:
  broker: !secret mqtt_server
  port: !secret mqtt_port
  username: !secret mqtt_username
  password: !secret mqtt_password
  keepalive: 60
  client_id: pi_ha

sonos:
  media_player:
    hosts:
      - !secret sonos_living_room_ip
      - !secret sonos_front_room_ip

binary_sensor:
  - platform: workday
    country: US

lovelace:
  mode: yaml
  resources:
    - url: /local/button-card.js
      type: module

# Google Calendar
google:
  client_id: !secret google_client_id
  client_secret: !secret google_client_secret

emulated_hue:
  expose_by_default: false
  host_ip: !secret ha_ip_address
  listen_port: 8300
  exposed_domains:
    - light
    - switch
    - input_boolean

panel_iframe:
  front_room_ha:
    title: Front Room HA
    icon: mdi:home-assistant
    url: !secret front_room_ha_url
  tv_room_ha:
    title: TV Room HA
    icon: mdi:home-assistant
    url: !secret tv_room_ha_url
  snapcast_server:
    title: Snapcast Server
    icon: mdi:music
    url: !secret snapcast_server_url

ios:
  push:
    categories:
      - name: Single Car Garage Door
        identifier: "1CAR_GARAGE"
        actions:
          - identifier: "1CAR_GARAGE_CLOSE"
            title: "Close Garage Door"
            activationMode: "background"
            authenticationRequired: yes
            destructive: yes
            behavior: "default"
      - name: Two Car Garage Door
        identifier: "2CAR_GARAGE"
        actions:
          - identifier: "2CAR_GARAGE_CLOSE"
            title: "Close Garage Door"
            activationMode: "background"
            authenticationRequired: yes
            destructive: yes
            behavior: "default"
      - name: Trash Recycle
        identifier: "trash_recycle"
        actions:
          - identifier: "TRASH_LEFT"
            title: "Done"
            activationMode: "background"
            authenticationRequired: yes
            destructive: yes
            behavior: "default"
          - identifier: "TRASH_REMIND_LATER"
            title: "Remind Later"
            activationMode: "background"
            authenticationRequired: yes
            destructive: yes
            behavior: "default"
      - name: Welcome Home
        identifier: "welcome_home"
        actions:
          - identifier: "DISABLE_SECURITY"
            title: "Yes"
            activationMode: "background"
            authenticationRequired: yes
            destructive: yes
            behavior: "default"
