Restore august lock changed_by state on restart (#32340)
* Various code review items from previous PRs * Add a test for fetching the doorbell camera image * Switch to using UNIT_PERCENTAGE for battery charge unit * Add tests for changed_by
This commit is contained in:
parent
e9a7b66df6
commit
be14b94705
8 changed files with 112 additions and 50 deletions
|
@ -2,6 +2,7 @@
|
|||
import logging
|
||||
|
||||
from homeassistant.components.sensor import DEVICE_CLASS_BATTERY
|
||||
from homeassistant.const import UNIT_PERCENTAGE
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
|
@ -111,7 +112,7 @@ class AugustBatterySensor(AugustEntityMixin, Entity):
|
|||
@property
|
||||
def unit_of_measurement(self):
|
||||
"""Return the unit of measurement."""
|
||||
return "%" # UNIT_PERCENTAGE will be available after PR#32094
|
||||
return UNIT_PERCENTAGE
|
||||
|
||||
@property
|
||||
def device_class(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue