golles / ha-kamstrup_403

Custom component that integrates the Kamstrup 403 heating system into Home Assistant. This component does also support a few other heating systems
MIT License
72 stars 12 forks source link

Support for SERVICE HOMEASSISTANT.UPDATE_ENTITY and disable standard polling interval. #117

Closed jorgh6 closed 6 months ago

jorgh6 commented 7 months ago

Did you read the instructions?

The request

Since most Kamstrup heat meters are battery powered, we should limit the number of times the integration reads the data from the meter. Now, the interval is configurable to a single interval, which starts when the integration starts, and thus is kind of random.

If the integration would support the homeassistant.update_entity service, we could configure specific polling times and intervals through automations or node red. This would for instant allow polling at the 59th minute of every hour, so the statistics in the energy dashboard more accurately match the energy consumption of the hours covered in the graph. In addition, it would allow different polling intervals during day/night etc.

Additional information

No response

golles commented 7 months ago

Hi, I see what you want to achieve. Something like this isn't supported at the moment, my suggestion is to set the interval to 86400 seconds (once a day, max value) and use indeed the service to manually update in an automation on the preferred time:

service: homeassistant.update_entity
target:
  entity_id: sensor.kamstrup_403_heat_energy_e1

This will result in 25 readings per day, which should be fine for the battery.

jorgh6 commented 7 months ago

Thanks for the quick reply.

I did not know what the maximum interval was, so that is good to know.

The feature request was to add a toggle to the config to disable the interval and trigger 'external' updates. I've seen this in other integrations as well.

Nevertheless, this solution works.

Maybe on some rainy sunday morning when you've got nothing else to do, it's a nice little feature update ;-)

Regards,

Jorg

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 6 months ago

This issue was closed because it has been stalled for 5 days with no activity.