KartoffelToby / better_thermostat

This custom component for Home Assistant will add crucial features to your climate-controlling TRV (Thermostatic Radiator Valves) to save you the work of creating automations to make it smart. It combines a room-temperature sensor, window/door sensors, weather forecasts, or an ambient temperature probe to decide when it should call for heat and automatically calibrate your TRVs to fix the imprecise measurements taken in the radiator's vicinity.
https://better-thermostat.org
GNU Affero General Public License v3.0
832 stars 126 forks source link

Group mode not working #68

Closed bruvv closed 2 years ago

bruvv commented 2 years ago

TL:DR;

Grouping thermostats isn't working.

Prerequisites

Description

I have multiple thermostats in my different rooms. Since I want to adjust 2 at the same time I use this addon: https://github.com/daenny/climate_group

I have setup groups us followed:

  - platform: climate_group
    name: 'Woonkamer Thermostaat AI'
    temperature_unit: C  # default to celsius, 'C' or 'F'
    entities:
    - climate.living_room_1_ai
    - climate.living_room_2_ai

And this is the ai setup:

  - platform: ai_thermostat
    name: "Living Room 1 AI"
    unique_id: 435345346 # Its important for Google Home
    thermostat: climate.woonkamer_thermo_1
    temperature_sensor: sensor.woonkamer_temp_temperature
    #window_sensors: group.office_windows #if this is not set, the window open detection is off
    weather: weather.openweathermap #if this is set, the outdoor_sensor is ignored, remove the outdoor_sensor config!
    #outdoor_sensor: sensor.outdoor_temperature #if you want to use it, remove the weather config!
    off_temperature: 18
    #window_off_delay: 0
    valve_maintenance: false
    night_temp: 5
    night_start: '21:30'
    night_end: '08:00'
  - platform: ai_thermostat
    name: "Living Room 2 AI"
    unique_id: 435345341 # Its important for Google Home
    thermostat: climate.woonkamer_thermo_2
    temperature_sensor: sensor.woonkamer_temp_temperature
    #window_sensors: group.office_windows #if this is not set, the window open detection is off
    weather: weather.openweathermap #if this is set, the outdoor_sensor is ignored, remove the outdoor_sensor config!
    #outdoor_sensor: sensor.outdoor_temperature #if you want to use it, remove the weather config!
    off_temperature: 18
    #window_off_delay: 0
    valve_maintenance: false
    night_temp: 5
    night_start: '21:30'
    night_end: '08:00'

Now only the first one is being changed. Is there perhaps an option to use ai_thermostat to group different thermostats?

Steps to Reproduce

  1. Group different climate trvs
  2. Only 1 will change
  3. you will get cold

Expected behavior:

All of them change.

Actual behavior:

only 1 changes

Versions

Home Assistant: 2021.11.5 Zigbee2mqtt: 1.22.1-1

KartoffelToby commented 2 years ago

i didn't tried it. but i think about it.

because the different TRV have different local temperaturs its not good to group them.

but. it should be working if you create for each of your TRV a ai TRV and groupe them.

KartoffelToby commented 2 years ago

22

bruvv commented 2 years ago

Also to update here: as mentioned in the issue: grouping is not working.

KartoffelToby commented 2 years ago

okay if the other way of grouping dosn't work i must debug it. i'll build up a test Bench with two Spirits soon.

KartoffelToby commented 2 years ago

@bruvv I test it with my Spirits and Moes, and it worked in that way i described you, to make it clear i have a basic config demo:

- platform: ai_thermostat
  name: Ai - TRV - Office - 1
  thermostat: climate.real_trv_office_1
  temperature_sensor: sensor.temperatur_office_temperature
  window_sensors: group.office_windows
  weather: weather.home
  off_temperature: 20
  unique_id: 1
- platform: ai_thermostat
  name: Ai - TRV - Office - 2
  thermostat: climate.real_trv_office_2
  temperature_sensor: sensor.temperatur_office_temperature
  window_sensors: group.office_windows
  weather: weather.home
  off_temperature: 20
  unique_id: 2
- platform: climate_group
  name: "TRV - Office"
  temperature_unit: C
  entities:
    - climate.ai_trv_office_1
    - climate.ai_trv_office_2
bruvv commented 2 years ago

For some weird reason it was all messy with my unique_ids that I didn't bother changing since I do not use google home. Removing them like in your example fixed it for me. Added a PR to elaborate on this: https://github.com/KartoffelToby/ai_thermostat/pull/77