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

Controll Center Widgets do not reflect current state #3174

Open
Glow91 opened this issue Nov 18, 2024 · 10 comments
Open

Controll Center Widgets do not reflect current state #3174

Glow91 opened this issue Nov 18, 2024 · 10 comments

Comments

@Glow91
Copy link

Glow91 commented Nov 18, 2024

Model Name: iPhone 12 Pro
Software Version: 18.0
App version: 2024.9.4 (2024.905)

Home Assistant Core Version
2024.11.2

Describe the bug
If some Lights or Switches has been added to the Control Center for Quick Access, the State of these Entities will not be reflected correctly what make them nearly useless.
So ist possible (almost the case) the Control Center Shows me the Office Light is turned on but it isn't.
Try to toggle the Light to see the result will end in an inverted behavior of the light.
It is shown as Off in Control Center but is Turned on, a additional Tab causes it to be shown as On but it is Off

To Reproduce
Add some Lights to the Control Center, toggle them from different Sources eg Turn on via a Switch or an Automation.
Then look to the Control Center while Toggling, you will see that you don't see any change 😄

Expected behavior
The current state of the selected Entity will be shown and will be also updated in real time.
If this is not Possible this feature is nearly useless.

Screenshots
Tricky to show this in a Screenshot. In case it would help I can try to capture a short clip. Let me know please :)

@bgoncal
Copy link
Member

bgoncal commented Nov 18, 2024

Please check the current testflight beta if you have time, in there it will reflect the correct state for most cases.
Although it wont reflect realtime state in case you change your light through another way, to reflect it realtime we would need to implement push notifications (since its the only way apple allows to remotely refresh control states) and since we have a cap of 500 notifications per day, this would be not enough to most users with several lights on their homes.

Current workaround, you can create an automation that updates controls through push notification command (update_widgets ), but dont forget the limit mentioned above: https://companion.home-assistant.io/docs/notifications/notification-commands

@bgoncal bgoncal self-assigned this Nov 18, 2024
@bgoncal
Copy link
Member

bgoncal commented Nov 18, 2024

Automation example:


alias: Update widgets quando algumas luzes mudarem
description: ""
triggers:
  - trigger: state
    entity_id:
      - light.kitchen_lightstrip
      - light.kitchen_spots
      - light.tv_rack_lights
      - switch.arvore_de_natal
      - cover.living_room_curtain
      - light.elements_4eb4
conditions: []
actions:
  - action: notify.mobile_app_bruno_s_iphone
    metadata: {}
    data:
      message: update_widgets
mode: single

@Glow91
Copy link
Author

Glow91 commented Nov 18, 2024

Thx for the quick response.
I will test the beta next days and give some feedback 👍🏻

@Glow91
Copy link
Author

Glow91 commented Nov 19, 2024

@bgoncal I need an TestFlight Invitation to get access to the Beta. Can you provide an invitation code or is there an other way to get the Beta?

@bgoncal
Copy link
Member

bgoncal commented Nov 19, 2024

Out beta is public:
https://testflight.apple.com/join/1AlPbnLZ

@Glow91
Copy link
Author

Glow91 commented Nov 20, 2024

It seems to be a little bit better but also not perfect.
Yesterday I had an scenario were some lights has been turned off and after ~1h later the control center widgets always showed the „old“ state.

One question about the notifications, you wrote something about a cap of 500 notifications a day, the documentation says 40-70 per 24h?

Are these notification limits also for Push Notifications or only for these update ones?

@bgoncal
Copy link
Member

bgoncal commented Nov 20, 2024

Can you link me to this doc you mentioned? The limit is 500 push notifications per day

@Glow91
Copy link
Author

Glow91 commented Nov 20, 2024

In the Dokumentation you provided: https://companion.home-assistant.io/docs/notifications/notification-commands

image

@Glow91
Copy link
Author

Glow91 commented Nov 20, 2024

My intention was to update the widget via automation every 4 minutes. This makes 360 per day so there are still 140 open for other stuff.

@bgoncal
Copy link
Member

bgoncal commented Nov 20, 2024

Oh, now I get what you mean, yeah it won't work, Apple restricts this, but when this doc was written it had widgets in mind, not sure about controls, give it a try meanwhile I'll check the possibilities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants