# =============================================================================
# Capteurs DOMO22
# Version: 1.0
# Date: 2025-10-31
# Produit: ECO-DOMO-22
# Capteurs: BME280, BH1750, DS18B20
# =============================================================================

sensor:
  # BME280 - Température, Humidité, Pression atmosphérique
  - platform: bme280
    temperature:
      name: "Température Ambiante"
      id: temp_ambient
      oversampling: 16x
      filters:
        - sliding_window_moving_average:
            window_size: 10
            send_every: 10
    humidity:
      name: "Humidité Ambiante"
      id: humidity_ambient
      filters:
        - sliding_window_moving_average:
            window_size: 10
            send_every: 10
    pressure:
      name: "Pression Atmosphérique"
      id: pressure
      filters:
        - sliding_window_moving_average:
            window_size: 10
            send_every: 10
    address: 0x76
    update_interval: 60s

  # BH1750 - Luminosité (lux)
  - platform: bh1750
    name: "Luminosité"
    id: light_sensor
    address: 0x23
    update_interval: 30s
    filters:
      - lambda: |-
          if (x < 10) return 0;
          else return x;

  # DS18B20 - Température précise (sonde externe)
  - platform: dallas
    address: 0x1c0000031edd2a28
    name: "Température Précise"
    id: temp_precise
    resolution: 12
    filters:
      - offset: -0.5  # Calibration à ajuster selon la sonde

  # Capteurs système
  - platform: wifi_signal
    name: "Signal WiFi"
    update_interval: 60s

  - platform: uptime
    name: "Uptime"
    update_interval: 60s
