Bouni / luxtronik

Luxtronik integration for Home Assistant
MIT License
82 stars 13 forks source link

Call manual update on sensor #38

Open Kh3nsu opened 2 years ago

Kh3nsu commented 2 years ago

Hello,

Is there a way to call an update on a sensor? As example after I write something to the heat pump I need an sensor update instantly. Sadly the option update_immediately_after_write does not work for me. Idk why, I put it in the configuration.yaml part. Or does it belong to every sensor I want to get updated after a write?

Or even better is there maybe a service luxtronik.write? (luxtronik.update or something?)

Kh3nsu commented 2 years ago

Hey I still haven't found a way to do so :( I also tried update_immediately_after_write again, didn't work .

Bouni commented 2 years ago

Sorry I'm not near a computer until Wednesday (Easter holiday) That's the earliest I can take a look....

Kh3nsu commented 2 years ago

That's no problem ^^ No rush. I also noticed an error popping up when trying to use homeassistant.update_entity:

Logger: homeassistant.helpers.entity_component Source: helpers/entity_component.py:41 First occurred: 14. April 2022, 17:53:51 (2 occurrences) Last logged: 14. April 2022, 17:53:54

Forced update failed. Component for luxtronik.haus_warmwasser_soll not loaded.

Kh3nsu commented 2 years ago

Heyhooo is there anything new about this? ^^

Bouni commented 2 years ago

Hi, no not yet, Covid struck and made Easter not so funny for me and my family 😓

Bouni commented 2 years ago

I just had a quick look at this and added a few logging calls to the custome_component as well as the luxtronik lib. It is clear that a write n combination with the update_immediately_after_write trigers an imediate read:

home-assistant  | 2022-04-29 08:07:02 ERROR (SyncWorker_1) [Luxtronik] WRITE
home-assistant  | 2022-04-29 08:07:02 ERROR (SyncWorker_1) [custom_components.luxtronik] Imediately update triggered!
home-assistant  | 2022-04-29 08:07:02 ERROR (SyncWorker_1) [Luxtronik] READ

But I also see that the HA state of the parameter I've teste changes state only after a while, so I guess that the throttle kicks in somehow ...

Kh3nsu commented 2 years ago

Heyyy,

is there maybe anything new about this? :D

Bouni commented 2 years ago

Nope, I have to find out if I can somehow force an update and overcome the throttle mechanism of Home Assistant ....