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 service to refresh states on TaHoma box #241

Closed
wants to merge 2 commits into from

Conversation

iMicknl
Copy link
Owner

@iMicknl iMicknl commented Aug 30, 2020

A first try to solve the issues around states for devices that need a refresh. In this PR a service is added to manually refresh the states. If this is the solution, we could add this as an option to the DataUpdateCoordinator.

Fixes #167, #233, #230

Please note that after the refresh is complete, the event needs to be fetched via the DataUpdateCoordinator.
2020-08-30 12:08:58 DEBUG (MainThread) [custom_components.tahoma.coordinator] RefreshAllDevicesStatesCompletedEvent/None (device:None,state:None->None)

@tetienne
Copy link
Collaborator

Why not create an other coordinator that will call regularly the refresh request?

@iMicknl
Copy link
Owner Author

iMicknl commented Aug 30, 2020

Why not create an other coordinator that will call regularly the refresh request?

That would be my next step. This was just to test if this command works, since I cannot test it myself unfortunately.

@vlebourl
Copy link
Collaborator

How would we decide the frequency of those refresh? We have to profile that code before making it automatic to be sure it doesn't consume too much resources.

@vlebourl
Copy link
Collaborator

How does this fix #223?

@iMicknl
Copy link
Owner Author

iMicknl commented Aug 31, 2020

How does this fix #223?

#233 😂. Apparently I only fixed this link on the 'linked issues' part, but forgot to update my original post.

@iMicknl
Copy link
Owner Author

iMicknl commented Aug 31, 2020

How would we decide the frequency of those refresh? We have to profile that code before making it automatic to be sure it doesn't consume too much resources.

Not sure yet. In HomeBridge they make this configurable and I saw many people putting it pretty low (60 seconds).

@iMicknl iMicknl force-pushed the feature/add_refresh_states_service branch from 03110e4 to cd7410b Compare September 1, 2020 10:48
@iMicknl iMicknl marked this pull request as ready for review September 1, 2020 13:59
@iMicknl iMicknl marked this pull request as draft September 1, 2020 14:00
@iMicknl iMicknl force-pushed the feature/add_refresh_states_service branch from f6b8690 to a06f194 Compare September 2, 2020 08:07
Signed-off-by: Mick Vleeshouwer <mick@imick.nl>
@iMicknl iMicknl force-pushed the feature/add_refresh_states_service branch from a06f194 to 30b6ed3 Compare September 2, 2020 19:24
@iMicknl iMicknl closed this Sep 2, 2020
@iMicknl iMicknl deleted the feature/add_refresh_states_service branch September 2, 2020 19:27
@iMicknl iMicknl restored the feature/add_refresh_states_service branch September 2, 2020 19:27
@iMicknl iMicknl reopened this Sep 2, 2020
commit 39baced
Author: Mick Vleeshouwer <mick@imick.nl>
Date:   Mon Sep 14 10:00:18 2020 +0200

    Improve `stop` and `stop tilt` command for covers (#251)

commit af03275
Author: Vincent Le Bourlot <vlebourl@gmail.com>
Date:   Thu Sep 10 12:35:42 2020 +0200

    Rename UNIT_PERCENTAGE to PERCENTAGE (#257)

commit 34eeb61
Author: Vincent Le Bourlot <vlebourl@gmail.com>
Date:   Fri Sep 4 11:38:53 2020 +0200

    Add support for StatelessExteriorHeating device. (#244)

    * Add support for StatelessExteriorHeating device.

    * Add support for StatelessExteriorHeating device.

    * Changed unknown property to None. Added SUPPORT_PRESET_MODE.

    * Added services to services.yaml, removed up and down services. #211

    * Fix temperature unit. #211

    * Fix types. #211

    * limit service my to supported devices. #211

    * Added some debug logs.

    * Merge master into branch.

    * fixed wrong import
    #211

    * Add last ha action as preset and hvac mode state.
    #211

    * Renamed service.
    #211

    * Revert "Add last ha action as preset and hvac mode state."

    This reverts commit bdfb6f3
    #211

    * improved debug logging.
    #211

    * improved debug logging.
    #211

    * fix possible circular import. #211

    * Removed service

    * Changed preset to my only

    * Removed commented lines.

    * Cleaned up code.

    * Cleaned up code.

    * Removed unwanted logging message.

    #211

    * Switch mode and preset back to None.

    #211

    * cleanup code.

    #211

commit a95fb73
Author: Vincent Le Bourlot <vlebourl@gmail.com>
Date:   Fri Sep 4 09:57:46 2020 +0200

    Add service to send any command to tahoma. (#252)

    * Add service to send any command to tahoma.

    * Fixed jsons.

    * Update strings.json

    * Applied comments.

    * Add service to send any command to tahoma.

    * Rebased onto master.

    * Cleanup leftovers.

    * Cleanup some more leftovers.

commit 7a19a7c
Author: Mick Vleeshouwer <mick@imick.nl>
Date:   Thu Sep 3 11:39:59 2020 +0200

    Add support for DomesticHotWaterTank (#247)

Signed-off-by: Mick Vleeshouwer <mick@imick.nl>
@iMicknl iMicknl closed this Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants