Skip to content

Instantly share code, notes, and snippets.

@mathieucarbou
Last active December 13, 2023 09:54
Show Gist options
  • Save mathieucarbou/ebea1c204bbf88a3b35072f78b60875f to your computer and use it in GitHub Desktop.
Save mathieucarbou/ebea1c204bbf88a3b35072f78b60875f to your computer and use it in GitHub Desktop.
Home Assistant H&T (Hygrostat & Thermostat)

Home Assistant H&T (Hygrostat & Thermostat)

Hygrostat

View code:

type: humidifier
entity: humidifier.hygrostat_chambre_rdc
name: Chambre
features:
  - type: humidifier-toggle

image

Thermostat

View code:

type: thermostat
entity: climate.thermostat_chauffage
name: Chauffage
features:
  - type: climate-hvac-modes
    hvac_modes:
      - heat
      - 'off'
  - style: dropdown
    preset_modes:
      - away
      - home
      - sleep
    type: climate-preset-modes

image

configuration.yaml

Inside configuration.yaml (or, even better, in a package):

# https://www.home-assistant.io/integrations/climate
climate:
  # https://www.home-assistant.io/integrations/generic_thermostat/
  - platform: generic_thermostat
    name: Thermostat Chauffage
    unique_id: "01e37eed-3045-4eee-a786-1249567fe500"
    heater: switch.chauffage
    target_sensor: sensor.capteur_temperature_thermostat_chauffage
    min_temp: 10
    max_temp: 25
    ac_mode: false
    target_temp: 21
    target_temp_step: 1
    cold_tolerance: 0.5
    hot_tolerance: 0
    min_cycle_duration:
      seconds: 3
    keep_alive:
      seconds: 60
    initial_hvac_mode: "heat"
    away_temp: 10
    # comfort_temp: 22
    sleep_temp: 19
    home_temp: 21
    # activity_temp: 20
    precision: 0.1

# https://www.home-assistant.io/integrations/generic_hygrostat/
generic_hygrostat:
  - name: Hygrostat Chambre RDC
    humidifier: switch.deshumidificateur_chambre
    target_sensor: sensor.h_t_chambre_rdc_humidity
    min_humidity: 40
    max_humidity: 50
    target_humidity: 47
    dry_tolerance: 0
    wet_tolerance: 3
    device_class: "dehumidifier"
    min_cycle_duration:
      seconds: 3
    keep_alive:
      seconds: 600
    initial_state: false
    away_humidity: 50
    away_fixed: False
    sensor_stale_duration: 13:00:00
  - name: Hygrostat Salon
    humidifier: switch.deshumidificateur_salon
    target_sensor: sensor.h_t_salon_humidity
    min_humidity: 40
    max_humidity: 50
    target_humidity: 47
    dry_tolerance: 0
    wet_tolerance: 3
    device_class: "dehumidifier"
    min_cycle_duration:
      seconds: 3
    keep_alive:
      seconds: 600
    initial_state: false
    away_humidity: 50
    away_fixed: False
    sensor_stale_duration: 13:00:00
  - name: Hygrostat Bureau
    humidifier: switch.deshumidificateur_etage
    target_sensor: sensor.h_t_bureau_humidity
    min_humidity: 40
    max_humidity: 50
    target_humidity: 47
    dry_tolerance: 0
    wet_tolerance: 3
    device_class: "dehumidifier"
    min_cycle_duration:
      seconds: 3
    keep_alive:
      seconds: 600
    initial_state: false
    away_humidity: 50
    away_fixed: False
    sensor_stale_duration: 13:00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment