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.202

# 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
  include:
    domains:
      - light
      - switch
      - cover
    #entity_globs:
    # - sensor*
    entities:
      - sensor.tac2100_compteur_puissance_active
      - sensor.tac2100_compteur_courant
      - sensor.ecowitt_tempin
      - sensor.select_sql_query
      - sensor.ecu_current_power
      - sensor.tac2100_solar_puissance_active
      - sensor.disjoncteur_domo_z_power
      - sensor.tac2100_compteur_energie_active_totale
      - sensor.ecu_today_energy
      - sensor.ecowitt_temp
      - sensor.ecowitt_dewpoint
      - sensor.ecowitt_humidity
      - sensor.ecowitt_humidityin
      - sensor.ecowitt_baromabs
      - sensor.ecowitt_dailyrain
      - sensor.ecowitt_eventrain
      - sensor.ecowitt_hourlyrain
      - sensor.ecowitt_monthlyrain
      - sensor.ecowitt_rainrate
      - sensor.ecowitt_solarradiation
      - sensor.ecowitt_totalrain
      - sensor.ecowitt_windgust
      - sensor.ecowitt_baromrel
      - sensor.ecowitt_uv
      - sensor.presence_cuisine_motion_state
      - sensor.ecowitt_winddir
      - sensor.ecowitt_maxdailygust
      - sensor.ecowitt_windspeed
      - sensor.ecowitt_frostpoint
      - sensor.ecowitt_feelslike
      - sensor.qualite_air_co2
      - sensor.geiger_wemos_geiger
      - sensor.froling_s3_tdeg_fumee
      - sensor.froling_s3_tdeg_board
      - sensor.froling_s3_tdeg_depart_chauffage
      - sensor.froling_s3_tdeg_chaudiere
      - sensor.esp8266_tampon_temp_4d756f_temp_retour_chauff
      - sensor.froling_s3_tampon_haut
      - sensor.froling_s3_tampon_bas
      - sensor.esp8266_tampon_temp_4d756f_tampon_milieu
      - sensor.river2_battery_level
      - sensor.tac2100_compteur_tension
      - sensor.energy_pj1203_solar_power_b
      - sensor.energy_pj1203_solar_power_a
      - sensor.energy_pj1203_solar_current_b
      - sensor.energy_pj1203_solar_current_a
      - sensor.energy_pj1203_solar_energy_flow_a
      - sensor.energy_pj1203_solar_energy_flow_b
      - sensor.energy_pj1203_solar_energy_produced_a
      - sensor.energy_pj1203_solar_energy_produced_b
      - sensor.ecu_current_power
      - sensor.dell_5520_battery_dell5520
      - sensor.blitzortung_lightning_counter
      - sensor.compteur_eclair_mensuel
      - sensor.pj1203_zb_compteur_current_a
      - sensor.pj1203_zb_compteur_current_b
      - sensor.pj1203_zb_compteur_power_a
      - sensor.pj1203_zb_compteur_power_b
      - sensor.capteur_temperature_rond_temperature
      - sensor.smart_energy_meter_puissance
      - sensor.disjoncteur_domo_z_energy
      - sensor.prise_ecran_power
      - sensor.kc868_a8_d758d0_d758d0_bh1750_illuminance
      - sensor.t_chambre1
      - sensor.t_salle_de_bain
      - sensor.h_salle_de_bain
      - sensor.t_comble
      - sensor.t_chambre2
      - sensor.esp32_4_relays_garage_5a10c8_temperature_garage_5
      - sensor.wemos_cave_temperature
      - sensor.ecowitt_heatindex
      - sensor.wemos_bureau0_temperature
      - sensor.blitzortung_lightning_counter
      - sensor.aubess_cafetiere1_power
      - sensor.prise_ronde_power
      - sensor.prise_ronde_energy
      - sensor.smart_plug_2_puissance
      - person.gilles
      - sensor.qualite_air_salon_zb_co2

  #event_types:
  # - call_service

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

proxmoxve:
  - host: 10.0.0.205
    username: hass@pve
    password: Misstibet5*
    verify_ssl: false
    realm: pve
    nodes:
      - node: hpproliant
        vms:
          - 200
          - 201

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:  eyJ4NXQiOiJZV0kxTTJZNE1qWTNOemsyTkRZeU5XTTRPV014TXpjek1UVmhNbU14T1RSa09ETXlOVEE0Tnc9PSIsImtpZCI6ImdhdGV3YXlfY2VydGlmaWNhdGVfYWxpYXMiLCJ0eXAiOiJKV1QiL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TK7Azj-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.meteofrance.fr/public/DPVigilance/v1/vignettenationale-J/encours" -H "accept: */*" -H "apikey: eyJ4NXQiOiJZV0kxTTJZNE1qWTNOemsyTkRZeU5XTTRPV014TXpjek1UVmhNbU14T1RSa09ETXlOVEE0Tnc9PSIsImtpZCI6ImdhdGV3YXlfY2VydGlmaWNhdGVfYWxpYXMiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJiaWxvYmEyMDA1QGNhcmJvbi5zdXBlciIsImFwcGxpY2F0aW9uIjp7Im93bmVyIjoiYmlsb2JhMjAwNSIsInRpZXJRdW90YVR5cGUiOm51bGwsInRpZXIiOiJVbmxpbWl0ZWQiLCJuYW1lIjoiRGVmYXVsdEFwcGxpY2F0aW9uIiwiaWQiOjE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V0HNom57C3LDY1kzDLClejjfSDf80F7vByRpLHGl8qnokyw_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.eyJzdWIiOiJiaWxvYmEyMDA1QGNhcmJvbi5zdXBlciIsImFwcGxpY2F0aW9uIjp7Im93bmVyIjoiYmlsb2JhMjAwNSIsInRpZXJRdW90YVR5cGUiOm51bGwsInRpZXIiOiJVbmxpbWl0ZWQiLCJuYW1lIjoiRGVmYXVsdEFwcGxpY2F0aW9uIiwiaWQiOjEyODM3LCJ1dWlkIjoiZTczNDYwODctMjAzYS00NzFlLTg2MDMtOWVhZjkyYzQ5YTJiIn0sImlzcyI6Imh0dHBzOlwvXC9wb3J0YWlsLWFwaS5tZXRlb2ZyYW5jZS5mcjo0NDNcL29hdXRoMlwvdG9rZW4iLCJ0aWVySW5mbyI6eyI2MFJlcVBhck1pbiI6eyJ0aWVyUXVvdGFUeXBlIjoicmVxdWVzdENvdW50IiwiZ3JhcGhRTE1heENvbXBsZXhpdHkiOjAsImdyYXBoUUxNYXhEZXB0aCI6MCwic3RvcE9uUXVvdGFSZWFjaCI6dHJ1ZSwic3Bpa2VBcnJlc3RMaW1pdCI6MCwic3Bpa2VBcnJlc3RVbml0Ijoic2VjIn19LCJrZXl0eXBlIjoiUFJPRFVDVElPTiIsInN1YnNjcmliZWRBUElzIjpbeyJzdWJzY3JpYmVyVGVuYW50RG9tYWluIjoiY2FyYm9uLnN1cGVyIiwibmFtZSI6IkRvbm5lZXNQdWJsaXF1ZXNWaWdpbGFuY2UiLCJjb250ZXh0IjoiXC9wdWJsaWNcL0RQVmlnaWxhbmNlXC92MSIsInB1Ymxpc2hlciI6ImFkbWluIiwidmVyc2lvbiI6InYxIiwic3Vic2NyaXB0aW9uVGllciI6IjYwUmVxUGFyTWluIn1dLCJleHAiOjE3NDY1MjcyOTcsInRva2VuX3R5cGUiOiJhcGlLZXkiLCJpYXQiOjE3MTQ5OTEyOTcsImp0aSI6ImQ3OTQwZmMxLTYzZTgtNGQ1ZC1iZTBiLWZkZjdlN2RlNjkyMSJ9.JUskxCK07-Acn_bn_SRXjRFqTK7Azj-MGLVa7BP4xLeHbhXS5o2SX0Wn85XH55Il8JPnDZ47Pye4Zp_U5sqqFWWUkqN_B23ztc7YHJ5nXwDIg1sxNBT8fJLhIWD9s0NtqdmdDqU5OlqXkgSsh0nN9o0zLT9auj1-eSuZje8Ua84q1sDBrdc6wChbMRFPAX8OqDbQTErqpLhA5VtQNWPpORlArvTqj2t0XPX_Bi8YtaV0HNom57C3LDY1kzDLClejjfSDf80F7vByRpLHGl8qnokyw_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
