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

Battery and next alarm sensor improvements #740

Merged
merged 2 commits into from Aug 12, 2020

Conversation

dshokouhi
Copy link
Member

Battery level sensor:

Battery state sensor:

  • Add attribute for battery health
  • Add intents for battery low and okay. Battery low triggers when the system alerts the user the battery is low. Okay triggers when it recovers from being low
  • Add a second update when we receive a battery intent to update the charging state faster. As mentioned in Added ChargingBroadcastReceiver which can instantly update plugged in… #525 by @yoxjames without the battery changed intent the charging state won't fully update until the next sensor update. This is because the device is verifying the charging status. When we switch to battery intent the system sees several state updates which are a bit unnecessary. Waiting 5 seconds to update the state again ensures we not only detect the plug event instantly but also makes sure the state is as expected.

Next alarm sensor

@JBassett JBassett added bug Something isn't working patch A tiny change - Bumps patch build number labels Aug 12, 2020
@JBassett JBassett merged commit 6e82d37 into home-assistant:master Aug 12, 2020
@dshokouhi dshokouhi deleted the sensor_improvements branch August 16, 2020 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cla-signed patch A tiny change - Bumps patch build number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Next Alarm Filter Battery Level Sensor Icon not updated when charging.
3 participants