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

Update file header (#21061)

* Update file header

* Fix lint issue

* Fix lint issue
This commit is contained in:
Fabian Affolter
2019-02-14 16:01:46 +01:00
committed by GitHub
parent f4b2573c4b
commit 3736120c6a
130 changed files with 511 additions and 1058 deletions

View File

@@ -1,19 +1,19 @@
"""
Support for the Hive devices.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.hive/
"""
from homeassistant.const import TEMP_CELSIUS
"""Support for the Hive sensors."""
from homeassistant.components.hive import DATA_HIVE, DOMAIN
from homeassistant.const import TEMP_CELSIUS
from homeassistant.helpers.entity import Entity
DEPENDENCIES = ['hive']
FRIENDLY_NAMES = {'Hub_OnlineStatus': 'Hive Hub Status',
'Hive_OutsideTemperature': 'Outside Temperature'}
DEVICETYPE_ICONS = {'Hub_OnlineStatus': 'mdi:switch',
'Hive_OutsideTemperature': 'mdi:thermometer'}
FRIENDLY_NAMES = {
'Hub_OnlineStatus': 'Hive Hub Status',
'Hive_OutsideTemperature': 'Outside Temperature',
}
DEVICETYPE_ICONS = {
'Hub_OnlineStatus': 'mdi:switch',
'Hive_OutsideTemperature': 'mdi:thermometer',
}
def setup_platform(hass, config, add_entities, discovery_info=None):
@@ -36,8 +36,8 @@ class HiveSensorEntity(Entity):
self.device_type = hivedevice["HA_DeviceType"]
self.node_device_type = hivedevice["Hive_DeviceType"]
self.session = hivesession
self.data_updatesource = '{}.{}'.format(self.device_type,
self.node_id)
self.data_updatesource = '{}.{}'.format(
self.device_type, self.node_id)
self._unique_id = '{}-{}'.format(self.node_id, self.device_type)
self.session.entities.append(self)