Code linting

This commit is contained in:
2021-04-29 10:18:23 +00:00
parent c1a000abb3
commit 862b93a175
15 changed files with 337 additions and 305 deletions

View File

@@ -1,13 +1,12 @@
import logging
from datetime import datetime
import base64
from homeassistant.const import STATE_UNAVAILABLE, STATE_ON, STATE_OFF, STATE_IDLE
from homeassistant.components.camera import Camera
from .helpers import setup_platform, BrowserModEntity
PLATFORM = 'camera'
PLATFORM = "camera"
async def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
return setup_platform(hass, config, async_add_devices, PLATFORM, BrowserModCamera)
@@ -31,12 +30,12 @@ class BrowserModCamera(Camera, BrowserModEntity):
self.schedule_update_ha_state()
def camera_image(self):
return base64.b64decode(self.data.split(',')[1])
return base64.b64decode(self.data.split(",")[1])
@property
def device_state_attributes(self):
return {
"type": "browser_mod",
"deviceID": self.deviceID,
"last_seen": self.last_seen,
}
"type": "browser_mod",
"deviceID": self.deviceID,
"last_seen": self.last_seen,
}