Climate Group custom component for multiple radiator thermostats

I had the problem that I use multiple radiator thermostats which I want to set to the same temperature as they are all located in the same room. So inspired by the light group component i created the climate group component. Maybe that is useful for someone.

EDIT:
Now on a repo: https://github.com/daenny/climate_group

8 Likes

Nice! I Need this. How do i install it?

If you are using <=0.87 you can just place it in your config custom_components/climate/group.py

in 0.88 the custom components changed. So what I did, I renamed this file to custom_components/groups/climate.py
and add an empty file:
custom_components/groups/__init__.py
I also renamed the Class to ClimateGroups, but not sure if that is necessary.

EDIT: added __init__.py comment

1 Like

Have you thought about adding this to HA thru a PR to the main repo? I think it would be useful

1 Like

Hi @daenny,

I’m really interesting about your custom_component to group mulitple climate.

But unfortunately, on HASS 0.92.2, the load of the components falied with this error:
2019-05-02 11:59:14 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for groups which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-05-02 11:59:15 ERROR (Thread-10) [concurrent.futures] exception calling callback for <Future at 0x67b05e70 state=finished raised RuntimeError>
Traceback (most recent call last):
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/zeroconf/init.py”, line 54, in setup
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, stop_zeroconf)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 597, in listen_once
self.hass.loop, self.async_listen_once, event_type, listener,
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/async
.py", line 202, in run_callback_threadsafe
loop.call_soon_threadsafe(run_callback)
File “/usr/lib/python3.5/asyncio/base_events.py”, line 618, in call_soon_threadsafe
self._check_closed()
File “/usr/lib/python3.5/asyncio/base_events.py”, line 357, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.5/concurrent/futures/_base.py”, line 297, in _invoke_callbacks
callback(self)
File “/usr/lib/python3.5/asyncio/futures.py”, line 463, in _call_set_state
dest_loop.call_soon_threadsafe(_set_state, destination, source)
File “/usr/lib/python3.5/asyncio/base_events.py”, line 618, in call_soon_threadsafe
self._check_closed()
File “/usr/lib/python3.5/asyncio/base_events.py”, line 357, in _check_closed
raise RuntimeError(‘Event loop is closed’)
RuntimeError: Event loop is closed

Hi,

I try this but I am getting “Invalid configuration: Platform not found: climate.group” when checking configuration. Any idea why I get this ? Thanks a lot in advance !

In config.py you have to replace line 21 and 22

from homeassistant.components.climate import (STATE_AUTO, SUPPORT_OPERATION_MODE, 
    SUPPORT_TARGET_TEMPERATURE, PLATFORM_SCHEMA, ClimateDevice)

with

from homeassistant.components.climate import (ClimateDevice, PLATFORM_SCHEMA)
from homeassistant.components.climate.const import (SUPPORT_TARGET_TEMPERATURE, SUPPORT_OPERATION_MODE)
1 Like

Hi Moooof, I tried this but without success. I still have the same message “Invalid configuration: Platform not found: climate.group”. Do you manage to get this working on 0.93.1 ?

I got this working on 0.93.0.

This is the folder structure (__init__.py is empty and the cache folder was created by home assistant):

15

And this is the config:

climate:
  - platform: climate_group
    name: Heizungen Wohnzimmer
    entities:
    - climate.heizung_wohnzimmer_garten_1
    - climate.heizung_wohnzimmer_garten_2
    - climate.heizung_wohnzimmer_3

HTH

PS: Permission of __init__.py and climate.py is set to 755

Great! It works for me now !

Thanks a lot ! It is now working like a charm :slight_smile:

Just to help others… i recap all the things said here!
Thanks @daenny for his job

THIS IS THE README.txt file
How to install:
Put in “custom_components” folder located in hass.io inside the config folder.
(The 2 .py file must be config/custom_components/climate_group)

How to use in frontend
Put this inside configuration.yaml in config folder of hass.io

climate:

  • platform: climate_group
    name: ‘Climate Friendly Name’
    entities:
    • climate.clima1
    • climate.clima2
    • climate.clima3
    • climate.heater
    • climate.termostate

(use the entities you want to have in your climate_group)
(remeber to control 755 permission if doesn’t work)

PS @daenny if you put your work in the public repo it was very good for all!

Donwload Link (i generic use 0.1 version) TESTED AND WORK ON 0.94.1

Why don’t ask for official implementation?

Hi,

Thank @mccoy88f for the zip file and the readme. I put them all here:

I will add them to the HACS as well later.

Hi @daenny have you seen last HA update 0.96?
It introduce some modify to climate component. Do you know of yours works?

HA 0.96 broke the climate group component :frowning:

I have not had the time to upgrade to 0.96, but I heard that climate had major API changes. I will probably have a look sometime this week.

Hi all,
I made an initial WIP version of the climate group.
I got temperature working again, but not yet the operation mode.
https://github.com/daenny/climate_group/commit/8f8bad56ab8e95abd7acce782b7c126e7917a1d4
PS: I reformatted the file to unix, sorry for the big diff.

1 Like

I made a new release for 0.96. All previously supported feature are working again.
If I have too much time (which I do not :wink: ) I will look to add support for the new preset modes.

1 Like

HI,

I added repo using HACS and setup 3 group climate.

Hacs generated files in custom component folders but if I check config before reboot I receive this message:

Platform not found: climate.climate_group