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

Suivi websocket (bugs connus, ne pas faire d'issue) #594

Open
ic-dev21 opened this issue Feb 16, 2025 · 0 comments
Open

Suivi websocket (bugs connus, ne pas faire d'issue) #594

ic-dev21 opened this issue Feb 16, 2025 · 0 comments

Comments

@ic-dev21
Copy link
Collaborator

  • Les attributs allowed_kwh et used_kwh ne se populent pas correctement.
  • Certaines informations comme total_devices, opt_out_devices et pre_heat_devices ne persistent pas en mémoire.
  • Le used_kwh peut être obtenu via un "push on poll" en faisant rouler le code suivant:

@callback
async def request_challenge_consumption_update(
self, inv_id: int, event_id: int = 0
) -> None:
"""Sends the json payload to receive energy consumption updates from the challenge."""
event_id = event_id or self.challenge_id
LOG.debug(
f"Requesting challenge {event_id} consumption update at location {self.devices.location_id}"
)
await self._api.websocket_challenges.async_invoke(
[{"locationId": self.devices.location_id, "eventId": event_id}],
"RequestChallengeConsumptionUpdate",
inv_id,
)

Le problème (je crois) est du au fait que les attributs ne sont pas updatés sélectivement/peuvent venir de messages websocket différents.

Toute discussion de problèmes supplémentaires que je n'ai pas cerné sont bienvenues.

Bien sûr, tout PR qui peut régler le tout sera grandement apprécié.

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

No branches or pull requests

1 participant