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:
J. Nick Koston 2020-02-29 01:12:50 -10:00 committed by GitHub
parent e9a7b66df6
commit be14b94705
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 112 additions and 50 deletions

View file

@ -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):