1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Update file header (#21023)

* Update file header

* Update file header

* Update file header

* Update file header

* Update file header

* Fix lint issues
This commit is contained in:
Fabian Affolter
2019-02-13 21:21:14 +01:00
committed by GitHub
parent 22af9707ad
commit 127c55e0c1
492 changed files with 1015 additions and 3497 deletions

View File

@@ -1,9 +1,4 @@
"""
This component provides HA sensor support for Amcrest IP cameras.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.amcrest/
"""
"""Suppoort for Amcrest IP camera sensors."""
from datetime import timedelta
import logging
@@ -18,8 +13,8 @@ _LOGGER = logging.getLogger(__name__)
SCAN_INTERVAL = timedelta(seconds=10)
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
async def async_setup_platform(
hass, config, async_add_entities, discovery_info=None):
"""Set up a sensor for an Amcrest IP Camera."""
if discovery_info is None:
return
@@ -45,8 +40,8 @@ class AmcrestSensor(Entity):
self._attrs = {}
self._camera = camera
self._sensor_type = sensor_type
self._name = '{0}_{1}'.format(name,
SENSORS.get(self._sensor_type)[0])
self._name = '{0}_{1}'.format(
name, SENSORS.get(self._sensor_type)[0])
self._icon = 'mdi:{}'.format(SENSORS.get(self._sensor_type)[2])
self._state = None