# Loads default set of integrations. Do not remove.
default_config:

#logger:
#  default: debug

logger:
  default: warning
  logs:
    homeassistant.components.recorder: info

lovelace:
  mode: yaml
  resources:
    - url: "/local/community/lovelace-layout-card/layout-card.js"
      type: "module"
    - url: "/local/community/restriction-card/restriction-card.js?hacstag=215633404127"
      type: "module"

frontend:
  themes: !include_dir_merge_named themes

recorder:
  auto_purge: true
  auto_repack: true
  purge_keep_days: 20

influxdb:
  api_version: 2
  host: suren.me
  port: 8086
  ssl: true
  verify_ssl: true
  ssl_ca_cert: /config/certs/ca.crt
  token: ldzUdZynt3sPfCC4YetZzD5Z9D3J-WlqKOYeTK9nooMf51ly5wbSzozhyYDII8ROhCLH-eeJuFlPWs83DS_xQg==
  organization: SmartPI
  bucket: smartpi
  tags:
    source: SmartPI
  measurement_attr: "entity_id"
  default_measurement: "state"
  include:
    domains:
      - sensor
      - binary_sensor
      - switch
  ignore_attributes:
    - attribution
    - device_class
    - entity_id
    - entity_prefix
    - friendly_name
    - host
    - hostname
    - icon
    - max_msg_size
    - port
    - secure
    - state_class
    - unit_of_measurement
    - uuid
    - verify_ssl
    - battery


logbook:
  exclude:
    entities:
      - sensor.internet_time
      - sensor.time
      - sensor.date
    entity_globs:
      - sensor.weather_*
      - sensor.date_*
      - sensor.time_*
#    domains:
#      - sun

# Trusted networks should go first or allow_bypass_login will be ignored
homeassistant:
  auth_providers:
    - type: trusted_networks
      trusted_networks:
        - 192.168.50.0/23
      trusted_users:
        192.168.50.0/23: 31a296cc30a243089f121cef93b46cc0
        192.168.50.234: 31a296cc30a243089f121cef93b46cc0
        192.168.51.118: 31a296cc30a243089f121cef93b46cc0
      allow_bypass_login: true
#    - type: legacy_api_password
#      api_password: !secret api_password
    - type: homeassistant

# Hass is bad with self-signed certificates. Therefore, we use letsencrypt at darksoft.org and do proxying there
http:
#  ssl_certificate: /config/ssl/smartpi.suren.me.crt
#  ssl_key: /config/ssl/smartpi.suren.me.key
  use_x_forwarded_for: true
  trusted_proxies:
    - 192.168.21.1
    - 192.168.24.1

# Text to speech
tts:
  - platform: google_translate

telegram_bot:
  - platform: polling
    api_key: 5161737507:AAHAZZr_eh8ZOkhdg59XVIciGS2BkVBQU7M
    allowed_chat_ids:
      - -1001582338242


notify:
  - platform: telegram
    name: SmartPI
    chat_id: -1001582338242

#python_script:

ffmpeg:
  ffmpeg_bin: /usr/bin/ffmpeg

wake_on_lan:

sensor:
  - platform: time_date
    display_options:
      - 'time'
      - 'date'
      - 'date_time'
      - 'date_time_utc'
      - 'date_time_iso'
      - 'time_date'
      - 'time_utc'


automation ui: !include automations.yaml
script ui: !include scripts.yaml
scene ui: !include scenes.yaml


group: !include custom/group.yaml
template: !include custom/template.yaml
input_number: !include custom/input_number.yaml
binary_sensor: !include custom/binary_sensor.yaml
script manual: !include_dir_merge_named custom/scripts/
automation manual: !include_dir_merge_list custom/automation/
shell_command: !include custom/shell.yaml