jwillemsen / daikin_onecta

Home Assistant Integration for devices supported by the Daikin Onecta App
https://github.com/jwillemsen/daikin_onecta
GNU General Public License v3.0
261 stars 9 forks source link

[Feature Request] Support `update_entity` to trigger a manual poll #243

Closed tamet83 closed 2 months ago

tamet83 commented 3 months ago

Hi,

As mentioned in the title, it would be great to have the option to create an automation that activates high-frequency data polling under specific conditions.

I have an Altherma system for hot water, and I use an automation that notifies me when the water temperature drops below 30°C while someone is taking a shower. Due to call limitations, I can’t use the 5-minute polling, which could be useful to understand when I'm running out of hot water.

Do you think it would be possible to implement a service to modify the polling frequency?

Thanks in advance for considering this request.

jwillemsen commented 3 months ago

I have to look into this, maybe there is a generic way in HA to let an automation change the configuration of an integration. If not, it would be possible to do this through an automation, but that will be some work. Due to the upcoming holiday period it will take time to look into this, I mostly work on this integration during work hours when nothing urgent is on my desk

jwillemsen commented 3 months ago

What about a feature that you can trigger a poll from your automation? That way you can decide yourself when you want to do a poll.

jwillemsen commented 3 months ago

What about update_entity, see https://www.home-assistant.io/docs/scripts/service-calls/#homeassistant-services, have you tried that?

tamet83 commented 3 months ago

Hi, thanks for the information. Don't worry about the timing it's not urgent. Regarding the "update_entity" option, are you referring to updating the water temperature of the boiler? I will definitely give it a try to see if it works, but I fear it might not force the data polling from the cloud. I’ll try this evening after taking a shower and let you know if it works.

tamet83 commented 3 months ago

Sure, here's the translation:


Hi, I tried using entity_update on the entity sensor.altherma_domestichotwatertank_tank_temperature while the system was heating the water after a shower, but it doesn't seem to work: the temperature value doesn't get updated.

At this point, I wonder how often the Altherma system sends updates to the cloud. For example, if I change the set point temperature or the operating mode from heat pump to powerful via Home Assistant, the command is received almost instantly. However, it seems that the system parameters are updated more slowly. I noticed that the temperature status information in the ONECTA application does not update instantly compared to the current system status.

jwillemsen commented 3 months ago

Temperatures are not updated frequently. I don't know whether update_entity isn't working itself, or that it is old data. When I have spare time I will try update_entity myself

jwillemsen commented 3 months ago

See #245 for a test which fails, need to sort this out at a later moment in time

jwillemsen commented 3 months ago

Ok, extended PR #245 to test update_entity and it seems to work, when I call this service on a climate entity it does result in a call to the Daikin cloud, but only when the last call has been longer ago as the scan_ignore setting.

You could test this yourself, decrease the polling frequency to for example once per hour, make a change in the onecta app and after 30 seconds you call the update_entity for one of your climate entities, that should show the new value (when it is at least updated in the cloud)

jwillemsen commented 2 months ago

The test worked, please use update_entity to trigger a poll