Enhancements for Group & Entity Configuration
See original GitHub issueThis integration is usually already quite easy to configure. For some things, however, quite extensive YAML code is necessary - especially if there are many lights in a house. Therefore I would like to make a suggestion for the configuration of lights and groups.
The first proposal is for individual lights to be monitored. Instead of creating a separate platform entry for each entity, I could imagine the following notation. It saves space and allows additional configurations per light.
sensor:
- platform: powercalc
entities:
- entity_id: light.hallway
- entity_id: light.living_room
linear:
min_power: 0.5
max_power: 8
The second proposal concerns groups. Especially with the HomeAssistant Energy Dashboard, it does not make sense to evaluate each light individually for the sake of clarity. Whole rooms are more useful. Therefore, lights should not be created as individual entities by Powercalc, but directly as a joint room entity. The notation could look like this:
sensor:
- platform: powercalc
groups:
- name: "Hallway"
entities:
- entity_id: light.hallway
- entity_id: light.living_room
linear:
min_power: 0.5
max_power: 8
What are your thoughts on this?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:17 (17 by maintainers)
Top GitHub Comments
Thanks for your first valuable feedback. I think I’ll need to filter out unavailable entities, so they don’t get summed (causing this error).
Also you are right I forgot to add unit of measurement. Will do right away.
I had a thought about this in the past, but this is not so easy and need a major refactor on several places in the code to support something like this. I will give it another thought and maybe do some proof of concept to see if I can make it happen, but don’t have much time anywhere soon.
The reason I created #58 was to provide examples how to create groups for powercalc sensors. This is also just a few lines of yaml code, and works out of the box (as this is using standard home assistant components).
I agree it would be even less configuration with your proposal.