homeassistant:
  #  auth_providers:
  #  - type: trusted_networks
  #    trusted_networks:
  #       - 10.0.0.128
  #      - 10.0.0.113
  #      - 10.0.0.216
  #       - 10.0.0.217
  #      - 10.0.0.1
  #     allow_bypass_login: true

  #  allowlist_external_dirs:
  #   - /config/capture
  customize: !include customize.yaml
  packages: !include_dir_named packages

http: #si cette balise n'existe pas, ajoutez la, sinon ajouter seulement la suite (pas de duplication)
  use_x_forwarded_for: true
  trusted_proxies:
    - 10.0.0.16

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

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

zone:
  - name: Travail
    latitude: 45.26994161017957
    longitude: 4.111876806976284
    radius: 200
    icon: mdi:factory

  # This will override the default home zone
  - name: home
    latitude: 45.14203329491988
    longitude: 4.075071876335187
    radius: 20
    icon: mdi:home

  - name: Near_Home
    latitude: 45.14203329491988
    longitude: 4.075071876335187
    radius: 200
    icon: mdi:broadcast

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
group: !include groups.yaml

automation old: !include_dir_merge_list automation/
switch: !include_dir_merge_list 01capteur/switch/
light: !include_dir_merge_list 01capteur/light/
sensor: !include_dir_merge_list 01capteur/sensor/
binary_sensor: !include_dir_merge_list 01capteur/binary_sensor/
template: !include_dir_merge_list 01capteur/template/
cover: !include_dir_merge_list 01capteur/cover/
mqtt: !include 01capteur/mqtt/mqtt.yaml
device_tracker: !include_dir_merge_list 01capteur/device_tracker/
#openhasp: !include 01capteur/openhasp.yaml
irrigation_unlimited: !include 01capteur/irrigation.yaml
shell_command: !include 01capteur/shell_commands.yaml
#modbus: !include_dir_merge_list 01capteur/modbus/
#recorder: !include_dir_merge_list 01capteur/recorder/

duckdns:
  domain: maison43
  access_token: 0fd20557-743c-41da-858e-724143602751

recorder:
  db_url: mysql://homeassistant:homeassistant@core-mariadb/homeassistant?charset=utf8mb4
  purge_keep_days: 30
  auto_purge: true
  auto_repack: true
  commit_interval: 5

alarm_control_panel:
  - platform: manual
    name: Home Alarm
    code: "1974"
    arming_time: 30
    delay_time: 20
    trigger_time: 4
    disarmed:
      trigger_time: 0
    armed_home:
      arming_time: 0
      delay_time: 0
    armed_night:
      arming_time: 0
      delay_time: 0

api:

wake_on_lan:

command_line:
  - sensor:
      name: Météo France alertes 43
      unique_id: meteo_france_alertes_43
      scan_interval: 10800
      command: >
        curl -X GET "https://public-api.meteofrance.fr/public/DPVigilance/v1/cartevigilance/encours' \ -H 'accept: */*' \ -H 'apikey:  eyJ4NXQiOiJZV0kxTTJZNE1qWTNOemsyTkRZeU5XTTRPV014TXpjek1UVmhNbU14T1RSa09ETXlOVEE0Tnc9PSIsImtpZCI6ImdhdGV3YXlfY2VydGlmaWNhdGVfYWxpYXMiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJiaWxvYmEyMDA1QGNhcmJvbi5zdXBlciIsImFwcGxpY2F0aW9uIjp7Im93bmVyIjoiYmlsb2JhMjAwNSIsInRpZXJRdW90YVR5cGUiOm51bGwsInRpZXIiOiJVbmxpbWl0ZWQiLCJuYW1lIjoiRGVmYXVsdEFwcGxpY2F0aW9uIiwiaWQiOjEyODM3LCJ1dWlkIjoiZTczNDYwODctMjAzYS00NzFlLTg2MDMtOWVhZjkyYzQ5YTJiIn0sImlzcyI6Imh0dHBzOlwvXC9wb3J0YWlsLWFwaS5tZXRlb2ZyYW5jZS5mcjo0NDNcL29hdXRoMlwvdG9rZW4iLCJ0aWVySW5mbyI6eyI2MFJlcVBhck1pbiI6eyJ0aWVyUXVvdGFUeXBlIjoicmVxdWVzdENvdW50IiwiZ3JhcGhRTE1heENvbXBsZXhpdHkiOjAsImdyYXBoUUxNYXhEZXB0aCI6MCwic3RvcE9uUXVvdGFSZWFjaCI6dHJ1ZSwic3Bpa2VBcnJlc3RMaW1pdCI6MCwic3Bpa2VBcnJlc3RVbml0Ijoic2VjIn19LCJrZXl0eXBlIjoiUFJPRFVDVElPTiIsInN1YnNjcmliZWRBUElzIjpbeyJzdWJzY3JpYmVyVGVuYW50RG9tYWluIjoiY2FyYm9uLnN1cGVyIiwibmFtZSI6IkRvbm5lZXNQdWJsaXF1ZXNWaWdpbGFuY2UiLCJjb250ZXh0IjoiXC9wdWJsaWNcL0RQVmlnaWxhbmNlXC92MSIsInB1Ymxpc2hlciI6ImFkbWluIiwidmVyc2lvbiI6InYxIiwic3Vic2NyaXB0aW9uVGllciI6IjYwUmVxUGFyTWluIn1dLCJleHAiOjE3NDY1MjcyOTcsInRva2VuX3R5cGUiOiJhcGlLZXkiLCJpYXQiOjE3MTQ5OTEyOTcsImp0aSI6ImQ3OTQwZmMxLTYzZTgtNGQ1ZC1iZTBiLWZkZjdlN2RlNjkyMSJ9.JUskxCK07-Acn_bn_SRXjRFqTK7Azj-MGLVa7BP4xLeHbhXS5o2SX0Wn85XH55Il8JPnDZ47Pye4Zp_U5sqqFWWUkqN_B23ztc7YHJ5nXwDIg1sxNBT8fJLhIWD9s0NtqdmdDqU5OlqXkgSsh0nN9o0zLT9auj1-eSuZje8Ua84q1sDBrdc6wChbMRFPAX8OqDbQTErqpLhA5VtQNWPpORlArvTqj2t0XPX_Bi8YtaV0HNom57C3LDY1kzDLClejjfSDf80F7vByRpLHGl8qnokyw_aciLJaFubsRobuTcx_IcWJa3YXy7LVyLax_MZnFXr6jabR9t4XU0_28ax48w==" | jq '{details: {"domain_max_color_id_today": .product.periods[0].timelaps.domain_ids[78].max_color_id,"domain_max_color_id_tomorrow": .product.periods[1].timelaps.domain_ids[78].max_color_id, "update_time": .product.update_time}, "today": .product.periods[0].timelaps.domain_ids[78].phenomenon_items | sort_by(.phenomenon_id), "tomorrow": .product.periods[1].timelaps.domain_ids[78].phenomenon_items | sort_by(.phenomenon_id)}'
      value_template: " {{ value_json.details.domain_max_color_id_today }} "
      json_attributes:
        - details
        - today
        - tomorrow
  - sensor:
      name: Météo France alertes image today
      unique_id: meteo_france_alertes_image_today
      scan_interval: 14400
      command: >
        curl -X GET "https://public-api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yaXB0aW9uVGllciI6IjYwUmVxUGFyTWluIn1dLCJleHAiOjE3NDY1MjcyOTcsInRva2VuX3R5cGUiOiJhcGlLZXkiLCJpYXQiOjE3MTQ5OTEyOTcsImp0aSI6ImQ3OTQwZmMxLTYzZTgtNGQ1ZC1iZTBiLWZkZjdlN2RlNjkyMSJ9.JUskxCK07-Acn_bn_SRXjRFqTK7Azj-MGLVa7BP4xLeHbhXS5o2SX0Wn85XH55Il8JPnDZ47Pye4Zp_U5sqqFWWUkqN_B23ztc7YHJ5nXwDIg1sxNBT8fJLhIWD9s0NtqdmdDqU5OlqXkgSsh0nN9o0zLT9auj1-eSuZje8Ua84q1sDBrdc6wChbMRFPAX8OqDbQTErqpLhA5VtQNWPpORlArvTqj2t0XPX_Bi8YtaV0HNom57C3LDY1kzDLClejjfSDf80F7vByRpLHGl8qnokyw_aciLJaFubsRobuTcx_IcWJa3YXy7LVyLax_MZnFXr6jabR9t4XU0_28ax48w==" > ./www/weather/meteo_france_alerte_today.jpg
      value_template: "mf_alerte_today"

  - sensor:
      name: Météo France alertes image tomorrow
      unique_id: meteo_france_alertes_image_tomorrow
      scan_interval: 14400
      command: >
        curl -X GET "https://public-api.meteofrance.fr/public/DPVigilance/v1/vignettenationale-J1/encours" -H "accept: */*" -H "apikey: eyJ4NXQiOiJZV0kxTTJZNE1qWTNOemsyTkRZeU5XTTRPV014TXpjek1UVmhNbU14T1RSa09ETXlOVEE0Tnc9PSIsImtpZCI6ImdhdGV3YXlfY2VydGlmaWNhdGVfYWxpYXMiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJiaWxvYmEyMDA1QGNhcmJvbi5zdXBlciIsImFwcGxpY2F0aW9uIjp7Im93bmVyIjoiYmlsb2JhMjAwNSIsInRpZXJRdW90YVR5cGUiOm51bGwsInRpZXIiOiJVbmxpbWl0ZWQiLCJuYW1lIjoiRGVmYXVsdEFwcGxpY2F0aW9uIiwiaWQiOjEyODM3LCJ1dWl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kzDLClejjfSDf80F7vByRpLHGl8qnokyw_aciLJaFubsRobuTcx_IcWJa3YXy7LVyLax_MZnFXr6jabR9t4XU0_28ax48w==" > ./www/weather/meteo_france_alerte_tomorrow.jpg
      value_template: "mf_alerte_tomorrow"

camera:
  - platform: local_file
    name: MF_alerte_today
    file_path: /config/www/weather/meteo_france_alerte_today.png

  - platform: local_file
    name: MF_alerte_tomorrow
    file_path: /config/www/weather/meteo_france_alerte_tomorrow.png

