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

Force HomeKit update when values change upstream #21

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

mganjoo
Copy link
Contributor

@mganjoo mganjoo commented Oct 11, 2023

While upstream Dreo app setting updates are reflected in the internal state of FanAccessory, this is not enough to trigger an update in HomeKit, which happen later, such as when refreshing the app, or when reloading the Accessories page in HomeBridge UI.

This change explicitly calls updateValue on the corresponding characteristic in response to this external trigger, which causes the accessory state to update instantaneously.

Tested this with DR-HAF003S on a local Homebridge installation.

Verified

This commit was signed with the committer’s verified signature.
mganjoo Milind Ganjoo
While upstream Dreo app setting updates are reflected in the internal
state of `FanAccessory`, this is not enough to trigger an update in
HomeKit, which happen later, such as when refreshing the app, or when
reloading the Accessories page in HomeBridge UI.

This change explicitly calls
[updateValue](https://developers.homebridge.io/#/api/characteristics#characteristicupdatevalue)
on the corresponding characteristic in response to this external
trigger, which causes the accessory state to update instantaneously.

Tested this with DR-HAF003S on a local Homebridge installation.
@zyonse zyonse self-assigned this Oct 31, 2023
@zyonse
Copy link
Owner

zyonse commented Oct 31, 2023

Thanks for the pull request! this should also fix #17

@zyonse zyonse merged commit a162cdd into zyonse:master Oct 31, 2023
@mganjoo mganjoo deleted the mganjoo/force-update-value-on-change branch October 31, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants