I have found this article on how to create cover groups via templates: Cover Templates
I have copied the cover_group example into my configuration. I have split them into different files, but that should not matter.
I am getting an error on top that
extra keys not allowed @ data['customize']['cover_group']
My configuration.yaml looks like this:
#include configuration files that are stored in packages folder
homeassistant:
packages: !include_dir_named packages
customize: !include customize.yaml
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Enables configuration UI
frontend:
themes: !include_dir_merge_named themes
#design
#lovelace:
# mode: yaml
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
And my customization.yaml looks just like this:
cover_group:
assume_state: true
I am getting some other error messages that I dont really understand when I comment out the customization.yaml.
Logger: homeassistant.components.script.cover_group
Source: helpers/service.py:172
Integration: Script ([documentation](https://www.home-assistant.io/integrations/script), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+script%22))
First occurred: 10:13:40 PM (6 occurrences)
Last logged: 10:13:52 PM
cover_group: Error executing script. Unexpected error for call_service at pos 1: Template rendered invalid service: cover._cover
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 166, in async_prepare_call_from_config domain_service = cv.service(domain_service) File "/usr/src/homeassistant/homeassistant/helpers/config_validation.py", line 463, in service raise vol.Invalid(f"Service {value} does not match format <domain>.<name>") voluptuous.error.Invalid: Service cover._cover does not match format <domain>.<name> The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step await getattr( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 429, in _async_call_service_step domain, service_name, service_data = service.async_prepare_call_from_config( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 172, in async_prepare_call_from_config raise HomeAssistantError( homeassistant.exceptions.HomeAssistantError: Template rendered invalid service: cover._cover
1 - ‘cover_group’ is not an entity_id, I don’t know what entity_id you’re trying to customize, but that’s what you should be putting on the first line.
2 - It’s assumed (with a D) on the second line.
3 - One of your scripts has a service template that isn’t resolving to a correct service.
they are using cover_group here in this documentation.
they are using assume_state
not sure what can fail here when I copy from the source
What I am trying to achieve is to group covers in a room so that I can on a dashboard use one control to manage all of them (up, down). If I just group then, the entity has no controls but I have to click on them and then can manage every entity individually.
I am sorry for that misunderstanding. Maybe it was too late in Germany and my message was not clear.
Of course I tried your suggestions.
I corrected the missing „D“
as for the customization I didn’t know what to put. As I said I was to customize a group of covers. So that similar to lights the group of covers have joined actions (all up, all down). So I could not fix this and still have the First error message from above.
I was of the opinion, that the template below defined the cover_group as a new entity. But I might be wrong as I said I am totally new to HA and KNX in general and trying To find my way through.
Yes, a cover group is an entity, but you need it’s entity_id to customize it - so in the customize.yaml file, that first line should be the entity_id of your cover group.
The entity_id will look like this…
cover.something
Where ‘something’ is the individual reference to your entity. You can find it in your states list.
@wmaker All is working well. But do you have by any chance an idea how I can calculate the state_status of a cover group in the way mentioned above? because this
# Example configuration.yaml entry
cover:
- platform: group
entities:
- cover.hall_window
- cover.living_room_window
Not sure what you mean by state_status?
Let’s give it a name for clarity:
cover:
- platform: group
name: My Group
entities:
- cover.hall_window
- cover.living_room_window
This should create an entity cover.my_group. It will have state like any other cover (open/close).
HA will examine the state of all the individual covers in the group and derive a state for cover.my_group.
sorry for being unclear. I mean the % state of the group.
Every cover defines a position_state_address
position_state_address: '1/1/1'
which is showing me perfectly find the position_status of each cover (e.g. 60% closed) but the group doesnt have this. In the UI it always shows that its open.
Do I ready your message correctly that you are saying that this should work out of the box?
Hi,
I have not come across position_state_address, so not familiar with that term.
Covers have state open/closed and have various attributes, such as current_position (usually 0 to 100% open). Out of the box, HA will derive the state of the cover group (open/close). Out of the box If the covers in the group have the attribute current_position, then HA will derive the current_position of the group. As a side note, in my observations, if current_position of all the individual member are not identical, then HA will set the current_position of the group to 100%.
this is really a bit counter intuitive. I have the attached screenshots of the 2 covers and their statuses and then the group. One is closed one is at 30% and the group shows 100%. I would love to calculate the state based on all members of the group. E.g. (30%+0%)/2 = 15%