juice_power 0.1.0
juice_power: ^0.1.0 copied to clipboard
Battery and charging state as a Juice bloc — plugged-in, charge level and power-saver mode behind a swappable provider seam.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0 - 2026-07-25 #
Added #
- Initial release.
PowerBloc— owns the device's power situation: charging status, charge level, and OS power-saver mode.PowerProvider— vendor seam; the bloc depends on this, not on a platform plugin, so every transition is testable without a device.BatteryPlusProvider— default provider backed bybattery_plus.- Level polling — configurable
pollInterval(default 1 minute), because platforms broadcast plugged/unplugged but not the percentage;Duration.zerodisables it. - Unknown is reported as unknown —
percentandsaverOnare nullable and the provider logs rather than substituting a plausible value;isPluggedInis false forunknownstatus, andisAtOrBelowrefuses to compare against an unknown level. - Rebuild groups —
power:source,power:level,power:saver, emitted only for what actually changed.