question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhancements for Group & Entity Configuration

See original GitHub issue

This 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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
bramstrokercommented, Sep 12, 2021

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.

2reactions
bramstrokercommented, Aug 31, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Functionality enhancements for the entities - ServiceNow Docs
You can configure some functionality enhancements for the entities as part of the GRC updates. The following enhancements are available for ...
Read more >
what are enhancements? and what are user-exits?
The enhancement concept allows you to add your own functionality to SAP's standard business applications without having to modify the original applications. SAP ......
Read more >
2022.4: Groups! Groups! Groups! - Home Assistant
Welcoming new helpers to the UI, including groups! Helpers for switches with an identity crisis, updates, backups, performance improvements, ...
Read more >
What's New in EF Core 6.0 | Microsoft Learn
Model builder configuration for each property; A mapping attribute on each property; Explicit iteration over all properties of all entity types ...
Read more >
Oracle Fusion Cloud Oracle Human Resources 21D What's New
You can now generate the HCM Spreadsheet Data Loader template for a single element or a group of elements using the Generate HCM...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found