mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Black
This commit is contained in:
@@ -28,8 +28,7 @@ class BlinkSensor(Entity):
|
||||
def __init__(self, data, camera, sensor_type):
|
||||
"""Initialize sensors from Blink camera."""
|
||||
name, units, icon = SENSORS[sensor_type]
|
||||
self._name = "{} {} {}".format(
|
||||
BLINK_DATA, camera, name)
|
||||
self._name = "{} {} {}".format(BLINK_DATA, camera, name)
|
||||
self._camera_name = name
|
||||
self._type = sensor_type
|
||||
self.data = data
|
||||
@@ -39,8 +38,8 @@ class BlinkSensor(Entity):
|
||||
self._icon = icon
|
||||
self._unique_id = "{}-{}".format(self._camera.serial, self._type)
|
||||
self._sensor_key = self._type
|
||||
if self._type == 'temperature':
|
||||
self._sensor_key = 'temperature_calibrated'
|
||||
if self._type == "temperature":
|
||||
self._sensor_key = "temperature_calibrated"
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
@@ -75,5 +74,5 @@ class BlinkSensor(Entity):
|
||||
except KeyError:
|
||||
self._state = None
|
||||
_LOGGER.error(
|
||||
"%s not a valid camera attribute. Did the API change?",
|
||||
self._sensor_key)
|
||||
"%s not a valid camera attribute. Did the API change?", self._sensor_key
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user