Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a usefull automation example alerting potential new peaks? #35528

Open
ikke44 opened this issue Nov 1, 2024 · 1 comment
Open

Add a usefull automation example alerting potential new peaks? #35528

ikke44 opened this issue Nov 1, 2024 · 1 comment

Comments

@ikke44
Copy link

ikke44 commented Nov 1, 2024

Feedback

I spend some time figuring out how to get a notification based on the DSMR integration data in HA, a lot of information I found is outdated and doesn't use the sensors the DSMR integration is providing out of the box.

Finally I've realized it can be as simple as this:

alias: kwartierpiek alarm (DSMR)
description: Notificatie voor dreigende nieuwe kwartierpieken op basis van DSMR integratie
triggers:
  - trigger: template
    value_template: >-
      {{ states("sensor.electricity_meter_current_average_demand") | float(0) >
      states("sensor.electricity_meter_maximum_demand_current_month") | float(0)*0.9 }}
conditions: []
actions:
  - variables:
      maandkwartierpiek: "{{ states(\"sensor.electricity_meter_maximum_demand_current_month\") }}"
      huidigkwartier: "{{ states(\"sensor.electricity_meter_current_average_demand\") }}"
  - action: notify.mobile_app_pixel_7a
    metadata: {}
    data:
      message: >-
        Nieuwe kwartierpiek dreigt... Momenteel {{ huidigkwartier|round(2) }}kW
        vs. maand {{ maandkwartierpiek|round(2) }}kW
      data: {}
mode: single

Hence I suggest adding an 'example' section to your documentation.

URL

https://www.home-assistant.io/integrations/dsmr/

Version

2024.10.4

Additional information

The above provided example uses "dsmr_version": "5B" and "dsmr-parser==1.4.2" (as I've noticed that the names of the sensors the DSMR integration provides, depend on the DSMR version) and I am using the latest stable version (Core v2024.10.4).

@home-assistant
Copy link

home-assistant bot commented Nov 1, 2024

Hey there @RobBie1221, mind taking a look at this feedback as it has been labeled with an integration (dsmr) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of dsmr can trigger bot actions by commenting:

  • @home-assistant close Closes the feedback.
  • @home-assistant rename Awesome new title Renames the feedback.
  • @home-assistant reopen Reopen the feedback.
  • @home-assistant unassign dsmr Removes the current integration label and assignees on the feedback, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information) to the feedback.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information) on the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant