Test build of 2.2.0. Contributed by @mrmamba.
🔄 Changed
- Realtime pushes no longer trigger a cloud poll (in testing). The input and output powers and the AC switch from a websocket push go to the entities as it arrives, and the regular poll every 30 s still brings everything else. Measured cost of the old behaviour: 134 REST polls in 40 min instead of about 81 on a Balco 260, and polls about every 18 s instead of 30 s on a PR30V2. (#105)
- The battery level now only comes from the poll: a push's level often trailed the polled one, and on a Balco 260 a late push carried a lower level than the poll just before it.
- A push is only taken when its own timestamp is after the last poll and the last push taken, since pushes arrived up to 20 s late on a Balco 260. A push with no usable timestamp, or stamped more than 10 s ahead of the Home Assistant clock, is left to the poll.
- A change made in the BLUETTI app to something no push carries (the working mode, the ECO switches, the DC switch) now shows at the next poll, within 30 s.
Push readings were compared with the poll on a Balco 260 and a PR30V2, both importing from the grid only: the sign of grid power on export is not yet checked. The filter for late pushes is covered by tests and by a replay of a PR30V2 capture; it has not met a real late push yet.
Full Changelog: 2.1.1...2.2.0.b1