mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
More pylint 2 fixes (#15565)
## Description: More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon). ## Checklist: - [ ] The code change is tested and works locally. - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
This commit is contained in:
parent
ea18e06b08
commit
2f7b79764a
@ -85,7 +85,7 @@ ABODE_PLATFORMS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class AbodeSystem(object):
|
class AbodeSystem:
|
||||||
"""Abode System class."""
|
"""Abode System class."""
|
||||||
|
|
||||||
def __init__(self, username, password, cache,
|
def __init__(self, username, password, cache,
|
||||||
|
@ -110,7 +110,7 @@ NotificationItem = namedtuple(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class AdsHub(object):
|
class AdsHub:
|
||||||
"""Representation of an ADS connection."""
|
"""Representation of an ADS connection."""
|
||||||
|
|
||||||
def __init__(self, ads_client):
|
def __init__(self, ads_client):
|
||||||
|
@ -210,7 +210,7 @@ def resolve_slot_synonyms(key, request):
|
|||||||
return resolved_value
|
return resolved_value
|
||||||
|
|
||||||
|
|
||||||
class AlexaResponse(object):
|
class AlexaResponse:
|
||||||
"""Help generating the response for Alexa."""
|
"""Help generating the response for Alexa."""
|
||||||
|
|
||||||
def __init__(self, hass, intent_info):
|
def __init__(self, hass, intent_info):
|
||||||
|
@ -55,7 +55,7 @@ HANDLERS = Registry()
|
|||||||
ENTITY_ADAPTERS = Registry()
|
ENTITY_ADAPTERS = Registry()
|
||||||
|
|
||||||
|
|
||||||
class _DisplayCategory(object):
|
class _DisplayCategory:
|
||||||
"""Possible display categories for Discovery response.
|
"""Possible display categories for Discovery response.
|
||||||
|
|
||||||
https://developer.amazon.com/docs/device-apis/alexa-discovery.html#display-categories
|
https://developer.amazon.com/docs/device-apis/alexa-discovery.html#display-categories
|
||||||
@ -153,7 +153,7 @@ class _UnsupportedProperty(Exception):
|
|||||||
"""This entity does not support the requested Smart Home API property."""
|
"""This entity does not support the requested Smart Home API property."""
|
||||||
|
|
||||||
|
|
||||||
class _AlexaEntity(object):
|
class _AlexaEntity:
|
||||||
"""An adaptation of an entity, expressed in Alexa's terms.
|
"""An adaptation of an entity, expressed in Alexa's terms.
|
||||||
|
|
||||||
The API handlers should manipulate entities only through this interface.
|
The API handlers should manipulate entities only through this interface.
|
||||||
@ -208,7 +208,7 @@ class _AlexaEntity(object):
|
|||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
class _AlexaInterface(object):
|
class _AlexaInterface:
|
||||||
def __init__(self, entity):
|
def __init__(self, entity):
|
||||||
self.entity = entity
|
self.entity = entity
|
||||||
|
|
||||||
@ -615,7 +615,7 @@ class _SensorCapabilities(_AlexaEntity):
|
|||||||
yield _AlexaTemperatureSensor(self.entity)
|
yield _AlexaTemperatureSensor(self.entity)
|
||||||
|
|
||||||
|
|
||||||
class _Cause(object):
|
class _Cause:
|
||||||
"""Possible causes for property changes.
|
"""Possible causes for property changes.
|
||||||
|
|
||||||
https://developer.amazon.com/docs/smarthome/state-reporting-for-a-smart-home-skill.html#cause-object
|
https://developer.amazon.com/docs/smarthome/state-reporting-for-a-smart-home-skill.html#cause-object
|
||||||
|
@ -164,7 +164,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class AmcrestDevice(object):
|
class AmcrestDevice:
|
||||||
"""Representation of a base Amcrest discovery device."""
|
"""Representation of a base Amcrest discovery device."""
|
||||||
|
|
||||||
def __init__(self, camera, name, authentication, ffmpeg_arguments,
|
def __init__(self, camera, name, authentication, ffmpeg_arguments,
|
||||||
|
@ -58,7 +58,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class APCUPSdData(object):
|
class APCUPSdData:
|
||||||
"""Stores the data retrieved from APCUPSd.
|
"""Stores the data retrieved from APCUPSd.
|
||||||
|
|
||||||
For each entity to use, acts as the single point responsible for fetching
|
For each entity to use, acts as the single point responsible for fetching
|
||||||
|
@ -62,7 +62,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class ArduinoBoard(object):
|
class ArduinoBoard:
|
||||||
"""Representation of an Arduino board."""
|
"""Representation of an Arduino board."""
|
||||||
|
|
||||||
def __init__(self, port):
|
def __init__(self, port):
|
||||||
|
@ -48,7 +48,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class AsteriskData(object):
|
class AsteriskData:
|
||||||
"""Store Asterisk mailbox data."""
|
"""Store Asterisk mailbox data."""
|
||||||
|
|
||||||
def __init__(self, hass, host, port, password):
|
def __init__(self, hass, host, port, password):
|
||||||
|
@ -89,7 +89,7 @@ class ArestBinarySensor(BinarySensorDevice):
|
|||||||
self.arest.update()
|
self.arest.update()
|
||||||
|
|
||||||
|
|
||||||
class ArestData(object):
|
class ArestData:
|
||||||
"""Class for handling the data retrieval for pins."""
|
"""Class for handling the data retrieval for pins."""
|
||||||
|
|
||||||
def __init__(self, resource, pin):
|
def __init__(self, resource, pin):
|
||||||
|
@ -99,7 +99,7 @@ class AuroraSensor(BinarySensorDevice):
|
|||||||
self.aurora_data.update()
|
self.aurora_data.update()
|
||||||
|
|
||||||
|
|
||||||
class AuroraData(object):
|
class AuroraData:
|
||||||
"""Get aurora forecast."""
|
"""Get aurora forecast."""
|
||||||
|
|
||||||
def __init__(self, latitude, longitude, threshold):
|
def __init__(self, latitude, longitude, threshold):
|
||||||
|
@ -117,7 +117,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||||||
add_entities(entities)
|
add_entities(entities)
|
||||||
|
|
||||||
|
|
||||||
class HikvisionData(object):
|
class HikvisionData:
|
||||||
"""Hikvision device event stream object."""
|
"""Hikvision device event stream object."""
|
||||||
|
|
||||||
def __init__(self, hass, url, port, name, username, password):
|
def __init__(self, hass, url, port, name, username, password):
|
||||||
|
@ -101,7 +101,7 @@ class IssBinarySensor(BinarySensorDevice):
|
|||||||
self.iss_data.update()
|
self.iss_data.update()
|
||||||
|
|
||||||
|
|
||||||
class IssData(object):
|
class IssData:
|
||||||
"""Get data from the ISS API."""
|
"""Get data from the ISS API."""
|
||||||
|
|
||||||
def __init__(self, latitude, longitude):
|
def __init__(self, latitude, longitude):
|
||||||
|
@ -96,7 +96,7 @@ class PingBinarySensor(BinarySensorDevice):
|
|||||||
self.ping.update()
|
self.ping.update()
|
||||||
|
|
||||||
|
|
||||||
class PingData(object):
|
class PingData:
|
||||||
"""The Class for handling the data retrieval."""
|
"""The Class for handling the data retrieval."""
|
||||||
|
|
||||||
def __init__(self, host, count):
|
def __init__(self, host, count):
|
||||||
|
@ -63,7 +63,7 @@ class TapsAffSensor(BinarySensorDevice):
|
|||||||
self.data.update()
|
self.data.update()
|
||||||
|
|
||||||
|
|
||||||
class TapsAffData(object):
|
class TapsAffData:
|
||||||
"""Class for handling the data retrieval for pins."""
|
"""Class for handling the data retrieval for pins."""
|
||||||
|
|
||||||
def __init__(self, location):
|
def __init__(self, location):
|
||||||
|
@ -10,7 +10,7 @@ import homeassistant.util.dt as dt_util
|
|||||||
from homeassistant.helpers.event import track_point_in_time
|
from homeassistant.helpers.event import track_point_in_time
|
||||||
from homeassistant.components import zwave
|
from homeassistant.components import zwave
|
||||||
from homeassistant.components.zwave import workaround
|
from homeassistant.components.zwave import workaround
|
||||||
from homeassistant.components.zwave import async_setup_platform # noqa # pylint: disable=unused-import
|
from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
BinarySensorDevice)
|
BinarySensorDevice)
|
||||||
|
@ -40,7 +40,7 @@ SNAP_PICTURE_SCHEMA = vol.Schema({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
class BlinkSystem(object):
|
class BlinkSystem:
|
||||||
"""Blink System class."""
|
"""Blink System class."""
|
||||||
|
|
||||||
def __init__(self, config_info):
|
def __init__(self, config_info):
|
||||||
|
@ -50,7 +50,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class BloomSky(object):
|
class BloomSky:
|
||||||
"""Handle all communication with the BloomSky API."""
|
"""Handle all communication with the BloomSky API."""
|
||||||
|
|
||||||
# API documentation at http://weatherlution.com/bloomsky-api/
|
# API documentation at http://weatherlution.com/bloomsky-api/
|
||||||
|
@ -118,7 +118,7 @@ def setup_account(account_config: dict, hass, name: str) \
|
|||||||
return cd_account
|
return cd_account
|
||||||
|
|
||||||
|
|
||||||
class BMWConnectedDriveAccount(object):
|
class BMWConnectedDriveAccount:
|
||||||
"""Representation of a BMW vehicle."""
|
"""Representation of a BMW vehicle."""
|
||||||
|
|
||||||
def __init__(self, username: str, password: str, region_str: str,
|
def __init__(self, username: str, password: str, region_str: str,
|
||||||
|
@ -125,7 +125,7 @@ class WebDavCalendarEventDevice(CalendarEventDevice):
|
|||||||
return await self.data.async_get_events(hass, start_date, end_date)
|
return await self.data.async_get_events(hass, start_date, end_date)
|
||||||
|
|
||||||
|
|
||||||
class WebDavCalendarData(object):
|
class WebDavCalendarData:
|
||||||
"""Class to utilize the calendar dav client object to get next event."""
|
"""Class to utilize the calendar dav client object to get next event."""
|
||||||
|
|
||||||
def __init__(self, calendar, include_all_day, search):
|
def __init__(self, calendar, include_all_day, search):
|
||||||
|
@ -28,7 +28,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
class DemoGoogleCalendarData(object):
|
class DemoGoogleCalendarData:
|
||||||
"""Representation of a Demo Calendar element."""
|
"""Representation of a Demo Calendar element."""
|
||||||
|
|
||||||
event = {}
|
event = {}
|
||||||
|
@ -55,7 +55,7 @@ class GoogleCalendarEventDevice(CalendarEventDevice):
|
|||||||
return await self.data.async_get_events(hass, start_date, end_date)
|
return await self.data.async_get_events(hass, start_date, end_date)
|
||||||
|
|
||||||
|
|
||||||
class GoogleCalendarData(object):
|
class GoogleCalendarData:
|
||||||
"""Class to utilize calendar service object to get next event."""
|
"""Class to utilize calendar service object to get next event."""
|
||||||
|
|
||||||
def __init__(self, calendar_service, calendar_id, search,
|
def __init__(self, calendar_service, calendar_id, search,
|
||||||
|
@ -280,7 +280,7 @@ class TodoistProjectDevice(CalendarEventDevice):
|
|||||||
return attributes
|
return attributes
|
||||||
|
|
||||||
|
|
||||||
class TodoistProjectData(object):
|
class TodoistProjectData:
|
||||||
"""
|
"""
|
||||||
Class used by the Task Device service object to hold all Todoist Tasks.
|
Class used by the Task Device service object to hold all Todoist Tasks.
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class CanaryData(object):
|
class CanaryData:
|
||||||
"""Get the latest data and update the states."""
|
"""Get the latest data and update the states."""
|
||||||
|
|
||||||
def __init__(self, username, password, timeout):
|
def __init__(self, username, password, timeout):
|
||||||
|
@ -140,7 +140,7 @@ class NetatmoThermostat(ClimateDevice):
|
|||||||
self._away = self._data.setpoint_mode == 'away'
|
self._away = self._data.setpoint_mode == 'away'
|
||||||
|
|
||||||
|
|
||||||
class ThermostatData(object):
|
class ThermostatData:
|
||||||
"""Get the latest data from Netatmo."""
|
"""Get the latest data from Netatmo."""
|
||||||
|
|
||||||
def __init__(self, auth, device=None):
|
def __init__(self, auth, device=None):
|
||||||
|
@ -11,7 +11,7 @@ from homeassistant.components.climate import (
|
|||||||
SUPPORT_TARGET_TEMPERATURE, SUPPORT_FAN_MODE,
|
SUPPORT_TARGET_TEMPERATURE, SUPPORT_FAN_MODE,
|
||||||
SUPPORT_OPERATION_MODE, SUPPORT_SWING_MODE)
|
SUPPORT_OPERATION_MODE, SUPPORT_SWING_MODE)
|
||||||
from homeassistant.components.zwave import ZWaveDeviceEntity
|
from homeassistant.components.zwave import ZWaveDeviceEntity
|
||||||
from homeassistant.components.zwave import async_setup_platform # noqa # pylint: disable=unused-import
|
from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
STATE_OFF, TEMP_CELSIUS, TEMP_FAHRENHEIT, ATTR_TEMPERATURE)
|
STATE_OFF, TEMP_CELSIUS, TEMP_FAHRENHEIT, ATTR_TEMPERATURE)
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class CoinbaseData(object):
|
class CoinbaseData:
|
||||||
"""Get the latest data and update the states."""
|
"""Get the latest data and update the states."""
|
||||||
|
|
||||||
def __init__(self, api_key, api_secret):
|
def __init__(self, api_key, api_secret):
|
||||||
|
@ -88,7 +88,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class ComfoConnectBridge(object):
|
class ComfoConnectBridge:
|
||||||
"""Representation of a ComfoConnect bridge."""
|
"""Representation of a ComfoConnect bridge."""
|
||||||
|
|
||||||
def __init__(self, hass, bridge, name, token, friendly_name, pin):
|
def __init__(self, hass, bridge, name, token, friendly_name, pin):
|
||||||
|
@ -128,7 +128,7 @@ def async_setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class Configurator(object):
|
class Configurator:
|
||||||
"""The class to keep track of current configuration requests."""
|
"""The class to keep track of current configuration requests."""
|
||||||
|
|
||||||
def __init__(self, hass):
|
def __init__(self, hass):
|
||||||
|
@ -11,7 +11,7 @@ from homeassistant.components.cover import (
|
|||||||
DOMAIN, SUPPORT_OPEN, SUPPORT_CLOSE, ATTR_POSITION)
|
DOMAIN, SUPPORT_OPEN, SUPPORT_CLOSE, ATTR_POSITION)
|
||||||
from homeassistant.components.zwave import ZWaveDeviceEntity
|
from homeassistant.components.zwave import ZWaveDeviceEntity
|
||||||
from homeassistant.components import zwave
|
from homeassistant.components import zwave
|
||||||
from homeassistant.components.zwave import async_setup_platform # noqa # pylint: disable=unused-import
|
from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import
|
||||||
from homeassistant.components.zwave import workaround
|
from homeassistant.components.zwave import workaround
|
||||||
from homeassistant.components.cover import CoverDevice
|
from homeassistant.components.cover import CoverDevice
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ def daikin_api_setup(hass, host, name=None):
|
|||||||
return api
|
return api
|
||||||
|
|
||||||
|
|
||||||
class DaikinApi(object):
|
class DaikinApi:
|
||||||
"""Keep the Daikin instance in one place and centralize the update."""
|
"""Keep the Daikin instance in one place and centralize the update."""
|
||||||
|
|
||||||
def __init__(self, device, name):
|
def __init__(self, device, name):
|
||||||
|
@ -178,7 +178,7 @@ async def async_unload_entry(hass, config_entry):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class DeconzEvent(object):
|
class DeconzEvent:
|
||||||
"""When you want signals instead of entities.
|
"""When you want signals instead of entities.
|
||||||
|
|
||||||
Stateless sensors such as remotes are expected to generate an event
|
Stateless sensors such as remotes are expected to generate an event
|
||||||
|
@ -231,7 +231,7 @@ def async_setup(hass: HomeAssistantType, config: ConfigType):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class DeviceTracker(object):
|
class DeviceTracker:
|
||||||
"""Representation of a device tracker."""
|
"""Representation of a device tracker."""
|
||||||
|
|
||||||
def __init__(self, hass: HomeAssistantType, consider_home: timedelta,
|
def __init__(self, hass: HomeAssistantType, consider_home: timedelta,
|
||||||
@ -577,7 +577,7 @@ class Device(Entity):
|
|||||||
state.attributes[ATTR_LONGITUDE])
|
state.attributes[ATTR_LONGITUDE])
|
||||||
|
|
||||||
|
|
||||||
class DeviceScanner(object):
|
class DeviceScanner:
|
||||||
"""Device scanner object."""
|
"""Device scanner object."""
|
||||||
|
|
||||||
hass = None # type: HomeAssistantType
|
hass = None # type: HomeAssistantType
|
||||||
|
@ -193,7 +193,7 @@ class AutomaticAuthCallbackView(HomeAssistantView):
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
class AutomaticData(object):
|
class AutomaticData:
|
||||||
"""A class representing an Automatic cloud service connection."""
|
"""A class representing an Automatic cloud service connection."""
|
||||||
|
|
||||||
def __init__(self, hass, client, session, devices, async_see):
|
def __init__(self, hass, client, session, devices, async_see):
|
||||||
|
@ -27,7 +27,7 @@ def setup_scanner(hass, config, see, discovery_info=None):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class BMWDeviceTracker(object):
|
class BMWDeviceTracker:
|
||||||
"""BMW Connected Drive device tracker."""
|
"""BMW Connected Drive device tracker."""
|
||||||
|
|
||||||
def __init__(self, see, vehicle):
|
def __init__(self, see, vehicle):
|
||||||
|
@ -62,7 +62,7 @@ def _build_device(device_dict):
|
|||||||
device_dict['l3connectivities'][0]['addr'])
|
device_dict['l3connectivities'][0]['addr'])
|
||||||
|
|
||||||
|
|
||||||
class FreeboxDeviceScanner(object):
|
class FreeboxDeviceScanner:
|
||||||
"""This class scans for devices connected to the Freebox."""
|
"""This class scans for devices connected to the Freebox."""
|
||||||
|
|
||||||
def __init__(self, hass, config, async_see):
|
def __init__(self, hass, config, async_see):
|
||||||
|
@ -42,7 +42,7 @@ def setup_scanner(hass, config: ConfigType, see, discovery_info=None):
|
|||||||
return scanner.success_init
|
return scanner.success_init
|
||||||
|
|
||||||
|
|
||||||
class GoogleMapsScanner(object):
|
class GoogleMapsScanner:
|
||||||
"""Representation of an Google Maps location sharing account."""
|
"""Representation of an Google Maps location sharing account."""
|
||||||
|
|
||||||
def __init__(self, hass, config: ConfigType, see) -> None:
|
def __init__(self, hass, config: ConfigType, see) -> None:
|
||||||
|
@ -28,7 +28,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
class Host(object):
|
class Host:
|
||||||
"""Host object with ping detection."""
|
"""Host object with ping detection."""
|
||||||
|
|
||||||
def __init__(self, ip_address, dev_id, hass, config):
|
def __init__(self, ip_address, dev_id, hass, config):
|
||||||
|
@ -23,7 +23,7 @@ def setup_scanner(hass, config, see, discovery_info=None):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class TeslaDeviceTracker(object):
|
class TeslaDeviceTracker:
|
||||||
"""A class representing a Tesla device."""
|
"""A class representing a Tesla device."""
|
||||||
|
|
||||||
def __init__(self, hass, config, see, tesla_devices):
|
def __init__(self, hass, config, see, tesla_devices):
|
||||||
|
@ -74,7 +74,7 @@ async def async_setup_scanner(hass, config, async_see, discovery_info=None):
|
|||||||
return await scanner.async_init()
|
return await scanner.async_init()
|
||||||
|
|
||||||
|
|
||||||
class TileScanner(object):
|
class TileScanner:
|
||||||
"""Define an object to retrieve Tile data."""
|
"""Define an object to retrieve Tile data."""
|
||||||
|
|
||||||
def __init__(self, client, hass, async_see, types, show_inactive):
|
def __init__(self, client, hass, async_see, types, show_inactive):
|
||||||
|
@ -30,7 +30,7 @@ def setup_scanner(hass, config: dict, see, discovery_info=None):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class TrackRDeviceScanner(object):
|
class TrackRDeviceScanner:
|
||||||
"""A class representing a TrackR device."""
|
"""A class representing a TrackR device."""
|
||||||
|
|
||||||
def __init__(self, hass, config: dict, see) -> None:
|
def __init__(self, hass, config: dict, see) -> None:
|
||||||
|
@ -119,7 +119,7 @@ async def async_handle_message(hass, message):
|
|||||||
return dialogflow_response.as_dict()
|
return dialogflow_response.as_dict()
|
||||||
|
|
||||||
|
|
||||||
class DialogflowResponse(object):
|
class DialogflowResponse:
|
||||||
"""Help generating the response for Dialogflow."""
|
"""Help generating the response for Dialogflow."""
|
||||||
|
|
||||||
def __init__(self, parameters):
|
def __init__(self, parameters):
|
||||||
|
@ -65,7 +65,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class DigitalOcean(object):
|
class DigitalOcean:
|
||||||
"""Handle all communication with the Digital Ocean API."""
|
"""Handle all communication with the Digital Ocean API."""
|
||||||
|
|
||||||
def __init__(self, access_token):
|
def __init__(self, access_token):
|
||||||
|
@ -84,7 +84,7 @@ def setup_ecobee(hass, network, config):
|
|||||||
discovery.load_platform(hass, 'weather', DOMAIN, {}, config)
|
discovery.load_platform(hass, 'weather', DOMAIN, {}, config)
|
||||||
|
|
||||||
|
|
||||||
class EcobeeData(object):
|
class EcobeeData:
|
||||||
"""Get the latest data and update the states."""
|
"""Get the latest data and update the states."""
|
||||||
|
|
||||||
def __init__(self, config_file):
|
def __init__(self, config_file):
|
||||||
|
@ -136,7 +136,7 @@ def setup(hass, yaml_config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class Config(object):
|
class Config:
|
||||||
"""Hold configuration variables for the emulated hue bridge."""
|
"""Hold configuration variables for the emulated hue bridge."""
|
||||||
|
|
||||||
def __init__(self, hass, conf):
|
def __init__(self, hass, conf):
|
||||||
|
@ -11,7 +11,7 @@ from homeassistant.components.fan import (
|
|||||||
DOMAIN, FanEntity, SPEED_OFF, SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH,
|
DOMAIN, FanEntity, SPEED_OFF, SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH,
|
||||||
SUPPORT_SET_SPEED)
|
SUPPORT_SET_SPEED)
|
||||||
from homeassistant.components import zwave
|
from homeassistant.components import zwave
|
||||||
from homeassistant.components.zwave import async_setup_platform # noqa # pylint: disable=unused-import
|
from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ def setup(hass, config):
|
|||||||
return len(feeds) > 0
|
return len(feeds) > 0
|
||||||
|
|
||||||
|
|
||||||
class FeedManager(object):
|
class FeedManager:
|
||||||
"""Abstraction over Feedparser module."""
|
"""Abstraction over Feedparser module."""
|
||||||
|
|
||||||
def __init__(self, url, scan_interval, max_entries, hass, storage):
|
def __init__(self, url, scan_interval, max_entries, hass, storage):
|
||||||
@ -170,7 +170,7 @@ class FeedManager(object):
|
|||||||
self._firstrun = False
|
self._firstrun = False
|
||||||
|
|
||||||
|
|
||||||
class StoredData(object):
|
class StoredData:
|
||||||
"""Abstraction over pickle data storage."""
|
"""Abstraction over pickle data storage."""
|
||||||
|
|
||||||
def __init__(self, data_file):
|
def __init__(self, data_file):
|
||||||
|
@ -116,7 +116,7 @@ def async_setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class FFmpegManager(object):
|
class FFmpegManager:
|
||||||
"""Helper for ha-ffmpeg."""
|
"""Helper for ha-ffmpeg."""
|
||||||
|
|
||||||
def __init__(self, hass, ffmpeg_bin, run_test):
|
def __init__(self, hass, ffmpeg_bin, run_test):
|
||||||
|
@ -53,7 +53,7 @@ def setup(hass, base_config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class GC100Device(object):
|
class GC100Device:
|
||||||
"""The GC100 component."""
|
"""The GC100 component."""
|
||||||
|
|
||||||
def __init__(self, hass, gc_device):
|
def __init__(self, hass, gc_device):
|
||||||
|
@ -231,7 +231,7 @@ def do_setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class GoogleCalendarService(object):
|
class GoogleCalendarService:
|
||||||
"""Calendar service interface to Google."""
|
"""Calendar service interface to Google."""
|
||||||
|
|
||||||
def __init__(self, token_file):
|
def __init__(self, token_file):
|
||||||
|
@ -45,7 +45,7 @@ def _api_data(funct):
|
|||||||
return _wrapper
|
return _wrapper
|
||||||
|
|
||||||
|
|
||||||
class HassIO(object):
|
class HassIO:
|
||||||
"""Small API wrapper for Hass.io."""
|
"""Small API wrapper for Hass.io."""
|
||||||
|
|
||||||
def __init__(self, loop, websession, ip):
|
def __init__(self, loop, websession, ip):
|
||||||
|
@ -353,7 +353,7 @@ class HistoryPeriodView(HomeAssistantView):
|
|||||||
return await hass.async_add_job(self.json, result)
|
return await hass.async_add_job(self.json, result)
|
||||||
|
|
||||||
|
|
||||||
class Filters(object):
|
class Filters:
|
||||||
"""Container for the configured include and exclude filters."""
|
"""Container for the configured include and exclude filters."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -14,7 +14,7 @@ from .errors import HmipcConnectionError
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class HomematicipAuth(object):
|
class HomematicipAuth:
|
||||||
"""Manages HomematicIP client registration."""
|
"""Manages HomematicIP client registration."""
|
||||||
|
|
||||||
def __init__(self, hass, config):
|
def __init__(self, hass, config):
|
||||||
@ -73,7 +73,7 @@ class HomematicipAuth(object):
|
|||||||
return auth
|
return auth
|
||||||
|
|
||||||
|
|
||||||
class HomematicipHAP(object):
|
class HomematicipHAP:
|
||||||
"""Manages HomematicIP http and websocket connection."""
|
"""Manages HomematicIP http and websocket connection."""
|
||||||
|
|
||||||
def __init__(self, hass, config_entry):
|
def __init__(self, hass, config_entry):
|
||||||
|
@ -152,7 +152,7 @@ async def async_setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class HomeAssistantHTTP(object):
|
class HomeAssistantHTTP:
|
||||||
"""HTTP server for Home Assistant."""
|
"""HTTP server for Home Assistant."""
|
||||||
|
|
||||||
def __init__(self, hass, api_password,
|
def __init__(self, hass, api_password,
|
||||||
|
@ -107,7 +107,7 @@ async def process_wrong_login(request):
|
|||||||
'Banning IP address', NOTIFICATION_ID_BAN)
|
'Banning IP address', NOTIFICATION_ID_BAN)
|
||||||
|
|
||||||
|
|
||||||
class IpBan(object):
|
class IpBan:
|
||||||
"""Represents banned IP address."""
|
"""Represents banned IP address."""
|
||||||
|
|
||||||
def __init__(self, ip_ban: str, banned_at: datetime = None) -> None:
|
def __init__(self, ip_ban: str, banned_at: datetime = None) -> None:
|
||||||
|
@ -21,7 +21,7 @@ from .const import KEY_AUTHENTICATED, KEY_REAL_IP
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class HomeAssistantView(object):
|
class HomeAssistantView:
|
||||||
"""Base view for all views."""
|
"""Base view for all views."""
|
||||||
|
|
||||||
url = None
|
url = None
|
||||||
|
@ -19,7 +19,7 @@ SCENE_SCHEMA = vol.Schema({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
class HueBridge(object):
|
class HueBridge:
|
||||||
"""Manages a single Hue bridge."""
|
"""Manages a single Hue bridge."""
|
||||||
|
|
||||||
def __init__(self, hass, config_entry, allow_unreachable, allow_groups):
|
def __init__(self, hass, config_entry, allow_unreachable, allow_groups):
|
||||||
|
@ -101,7 +101,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class HydrawiseHub(object):
|
class HydrawiseHub:
|
||||||
"""Representation of a base Hydrawise device."""
|
"""Representation of a base Hydrawise device."""
|
||||||
|
|
||||||
def __init__(self, data):
|
def __init__(self, data):
|
||||||
|
@ -316,7 +316,7 @@ def async_setup(hass, config):
|
|||||||
State = collections.namedtuple('Product', 'stateType platform')
|
State = collections.namedtuple('Product', 'stateType platform')
|
||||||
|
|
||||||
|
|
||||||
class IPDB(object):
|
class IPDB:
|
||||||
"""Embodies the INSTEON Product Database static data and access methods."""
|
"""Embodies the INSTEON Product Database static data and access methods."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -163,7 +163,7 @@ class KeyboardRemoteThread(threading.Thread):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class KeyboardRemote(object):
|
class KeyboardRemote:
|
||||||
"""Sets up one thread per device."""
|
"""Sets up one thread per device."""
|
||||||
|
|
||||||
def __init__(self, hass, config):
|
def __init__(self, hass, config):
|
||||||
|
@ -129,7 +129,7 @@ def _get_devices(hass, discovery_type):
|
|||||||
hass.data[DATA_KNX].xknx.devices)))
|
hass.data[DATA_KNX].xknx.devices)))
|
||||||
|
|
||||||
|
|
||||||
class KNXModule(object):
|
class KNXModule:
|
||||||
"""Representation of KNX Object."""
|
"""Representation of KNX Object."""
|
||||||
|
|
||||||
def __init__(self, hass, config):
|
def __init__(self, hass, config):
|
||||||
@ -284,7 +284,7 @@ class KNXAutomation():
|
|||||||
device.actions.append(self.action)
|
device.actions.append(self.action)
|
||||||
|
|
||||||
|
|
||||||
class KNXExposeTime(object):
|
class KNXExposeTime:
|
||||||
"""Object to Expose Time/Date object to KNX bus."""
|
"""Object to Expose Time/Date object to KNX bus."""
|
||||||
|
|
||||||
def __init__(self, xknx, expose_type, address):
|
def __init__(self, xknx, expose_type, address):
|
||||||
@ -308,7 +308,7 @@ class KNXExposeTime(object):
|
|||||||
self.xknx.devices.add(self.device)
|
self.xknx.devices.add(self.device)
|
||||||
|
|
||||||
|
|
||||||
class KNXExposeSensor(object):
|
class KNXExposeSensor:
|
||||||
"""Object to Expose HASS entity to KNX bus."""
|
"""Object to Expose HASS entity to KNX bus."""
|
||||||
|
|
||||||
def __init__(self, hass, xknx, expose_type, entity_id, address):
|
def __init__(self, hass, xknx, expose_type, entity_id, address):
|
||||||
|
@ -114,7 +114,7 @@ async def async_setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class KonnectedDevice(object):
|
class KonnectedDevice:
|
||||||
"""A representation of a single Konnected device."""
|
"""A representation of a single Konnected device."""
|
||||||
|
|
||||||
def __init__(self, hass, host, port, config):
|
def __init__(self, hass, host, port, config):
|
||||||
|
@ -121,7 +121,7 @@ class GreenwaveLight(Light):
|
|||||||
self._name = bulbs[self._did]['name']
|
self._name = bulbs[self._did]['name']
|
||||||
|
|
||||||
|
|
||||||
class GatewayData(object):
|
class GatewayData:
|
||||||
"""Handle Gateway data and limit updates."""
|
"""Handle Gateway data and limit updates."""
|
||||||
|
|
||||||
def __init__(self, host, token):
|
def __init__(self, host, token):
|
||||||
|
@ -204,7 +204,7 @@ def merge_hsbk(base, change):
|
|||||||
return [b if c is None else c for b, c in zip(base, change)]
|
return [b if c is None else c for b, c in zip(base, change)]
|
||||||
|
|
||||||
|
|
||||||
class LIFXManager(object):
|
class LIFXManager:
|
||||||
"""Representation of all known LIFX entities."""
|
"""Representation of all known LIFX entities."""
|
||||||
|
|
||||||
def __init__(self, hass, async_add_devices):
|
def __init__(self, hass, async_add_devices):
|
||||||
|
@ -58,7 +58,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
lifx_library.probe()
|
lifx_library.probe()
|
||||||
|
|
||||||
|
|
||||||
class LIFX(object):
|
class LIFX:
|
||||||
"""Representation of a LIFX light."""
|
"""Representation of a LIFX light."""
|
||||||
|
|
||||||
def __init__(self, add_devices_callback, server_addr=None,
|
def __init__(self, add_devices_callback, server_addr=None,
|
||||||
|
@ -12,7 +12,7 @@ from homeassistant.components.light import (
|
|||||||
ATTR_TRANSITION, SUPPORT_BRIGHTNESS, SUPPORT_COLOR_TEMP, SUPPORT_COLOR,
|
ATTR_TRANSITION, SUPPORT_BRIGHTNESS, SUPPORT_COLOR_TEMP, SUPPORT_COLOR,
|
||||||
SUPPORT_TRANSITION, SUPPORT_WHITE_VALUE, DOMAIN, Light)
|
SUPPORT_TRANSITION, SUPPORT_WHITE_VALUE, DOMAIN, Light)
|
||||||
from homeassistant.components import zwave
|
from homeassistant.components import zwave
|
||||||
from homeassistant.components.zwave import async_setup_platform # noqa # pylint: disable=unused-import
|
from homeassistant.components.zwave import async_setup_platform # noqa pylint: disable=unused-import
|
||||||
from homeassistant.const import STATE_OFF, STATE_ON
|
from homeassistant.const import STATE_OFF, STATE_ON
|
||||||
import homeassistant.util.color as color_util
|
import homeassistant.util.color as color_util
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class Linode(object):
|
class Linode:
|
||||||
"""Handle all communication with the Linode API."""
|
"""Handle all communication with the Linode API."""
|
||||||
|
|
||||||
def __init__(self, access_token):
|
def __init__(self, access_token):
|
||||||
|
@ -140,7 +140,7 @@ class LogbookView(HomeAssistantView):
|
|||||||
return await hass.async_add_job(json_events)
|
return await hass.async_add_job(json_events)
|
||||||
|
|
||||||
|
|
||||||
class Entry(object):
|
class Entry:
|
||||||
"""A human readable version of the log."""
|
"""A human readable version of the log."""
|
||||||
|
|
||||||
def __init__(self, when=None, name=None, message=None, domain=None,
|
def __init__(self, when=None, name=None, message=None, domain=None,
|
||||||
|
@ -132,7 +132,7 @@ class MailboxEntity(Entity):
|
|||||||
self.message_count = len(messages)
|
self.message_count = len(messages)
|
||||||
|
|
||||||
|
|
||||||
class Mailbox(object):
|
class Mailbox:
|
||||||
"""Represent a mailbox device."""
|
"""Represent a mailbox device."""
|
||||||
|
|
||||||
def __init__(self, hass, name):
|
def __init__(self, hass, name):
|
||||||
|
@ -96,7 +96,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class MatrixBot(object):
|
class MatrixBot:
|
||||||
"""The Matrix Bot."""
|
"""The Matrix Bot."""
|
||||||
|
|
||||||
def __init__(self, hass, config_file, homeserver, verify_ssl,
|
def __init__(self, hass, config_file, homeserver, verify_ssl,
|
||||||
|
@ -79,7 +79,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class MaxCubeHandle(object):
|
class MaxCubeHandle:
|
||||||
"""Keep the cube instance in one place and centralize the update."""
|
"""Keep the cube instance in one place and centralize the update."""
|
||||||
|
|
||||||
def __init__(self, cube, scan_interval):
|
def __init__(self, cube, scan_interval):
|
||||||
|
@ -58,7 +58,7 @@ class MEQueryException(Exception):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class MediaExtractor(object):
|
class MediaExtractor:
|
||||||
"""Class which encapsulates all extraction logic."""
|
"""Class which encapsulates all extraction logic."""
|
||||||
|
|
||||||
def __init__(self, hass, component_config, call_data):
|
def __init__(self, hass, component_config, call_data):
|
||||||
|
@ -63,7 +63,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(slots=True, frozen=True)
|
@attr.s(slots=True, frozen=True)
|
||||||
class ChromecastInfo(object):
|
class ChromecastInfo:
|
||||||
"""Class to hold all data about a chromecast for creating connections.
|
"""Class to hold all data about a chromecast for creating connections.
|
||||||
|
|
||||||
This also has the same attributes as the mDNS fields by zeroconf.
|
This also has the same attributes as the mDNS fields by zeroconf.
|
||||||
@ -258,7 +258,7 @@ async def _async_setup_platform(hass: HomeAssistantType, config: ConfigType,
|
|||||||
hass.async_add_job(_discover_chromecast, hass, info)
|
hass.async_add_job(_discover_chromecast, hass, info)
|
||||||
|
|
||||||
|
|
||||||
class CastStatusListener(object):
|
class CastStatusListener:
|
||||||
"""Helper class to handle pychromecast status callbacks.
|
"""Helper class to handle pychromecast status callbacks.
|
||||||
|
|
||||||
Necessary because a CastDevice entity can create a new socket client
|
Necessary because a CastDevice entity can create a new socket client
|
||||||
|
@ -68,7 +68,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
_LOGGER.error("Could not connect to firetv-server at %s", host)
|
_LOGGER.error("Could not connect to firetv-server at %s", host)
|
||||||
|
|
||||||
|
|
||||||
class FireTV(object):
|
class FireTV:
|
||||||
"""The firetv-server client.
|
"""The firetv-server client.
|
||||||
|
|
||||||
Should a native Python 3 ADB module become available, python-firetv can
|
Should a native Python 3 ADB module become available, python-firetv can
|
||||||
|
@ -41,7 +41,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
class Itunes(object):
|
class Itunes:
|
||||||
"""The iTunes API client."""
|
"""The iTunes API client."""
|
||||||
|
|
||||||
def __init__(self, host, port, use_ssl):
|
def __init__(self, host, port, use_ssl):
|
||||||
|
@ -143,7 +143,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class LogitechMediaServer(object):
|
class LogitechMediaServer:
|
||||||
"""Representation of a Logitech media server."""
|
"""Representation of a Logitech media server."""
|
||||||
|
|
||||||
def __init__(self, hass, host, port, username, password):
|
def __init__(self, hass, host, port, username, password):
|
||||||
|
@ -289,7 +289,7 @@ class MicrosoftFaceGroupEntity(Entity):
|
|||||||
return attr
|
return attr
|
||||||
|
|
||||||
|
|
||||||
class MicrosoftFace(object):
|
class MicrosoftFace:
|
||||||
"""Microsoft Face api for HomeAssistant."""
|
"""Microsoft Face api for HomeAssistant."""
|
||||||
|
|
||||||
def __init__(self, hass, server_loc, api_key, timeout, entities):
|
def __init__(self, hass, server_loc, api_key, timeout, entities):
|
||||||
|
@ -61,7 +61,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class MochadCtrl(object):
|
class MochadCtrl:
|
||||||
"""Mochad controller."""
|
"""Mochad controller."""
|
||||||
|
|
||||||
def __init__(self, host, port):
|
def __init__(self, host, port):
|
||||||
|
@ -157,7 +157,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class ModbusHub(object):
|
class ModbusHub:
|
||||||
"""Thread safe wrapper class for pymodbus."""
|
"""Thread safe wrapper class for pymodbus."""
|
||||||
|
|
||||||
def __init__(self, modbus_client):
|
def __init__(self, modbus_client):
|
||||||
|
@ -462,7 +462,7 @@ async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool:
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(slots=True, frozen=True)
|
@attr.s(slots=True, frozen=True)
|
||||||
class Subscription(object):
|
class Subscription:
|
||||||
"""Class to hold data about an active subscription."""
|
"""Class to hold data about an active subscription."""
|
||||||
|
|
||||||
topic = attr.ib(type=str)
|
topic = attr.ib(type=str)
|
||||||
@ -472,7 +472,7 @@ class Subscription(object):
|
|||||||
|
|
||||||
|
|
||||||
@attr.s(slots=True, frozen=True)
|
@attr.s(slots=True, frozen=True)
|
||||||
class Message(object):
|
class Message:
|
||||||
"""MQTT Message."""
|
"""MQTT Message."""
|
||||||
|
|
||||||
topic = attr.ib(type=str)
|
topic = attr.ib(type=str)
|
||||||
@ -481,7 +481,7 @@ class Message(object):
|
|||||||
retain = attr.ib(type=bool, default=False)
|
retain = attr.ib(type=bool, default=False)
|
||||||
|
|
||||||
|
|
||||||
class MQTT(object):
|
class MQTT:
|
||||||
"""Home Assistant MQTT client."""
|
"""Home Assistant MQTT client."""
|
||||||
|
|
||||||
def __init__(self, hass: HomeAssistantType, broker: str, port: int,
|
def __init__(self, hass: HomeAssistantType, broker: str, port: int,
|
||||||
|
@ -41,7 +41,7 @@ CONFIG_SCHEMA = vol.Schema({
|
|||||||
}, extra=vol.ALLOW_EXTRA)
|
}, extra=vol.ALLOW_EXTRA)
|
||||||
|
|
||||||
|
|
||||||
class EVSensorConfig(object):
|
class EVSensorConfig:
|
||||||
"""The EV sensor configuration."""
|
"""The EV sensor configuration."""
|
||||||
|
|
||||||
def __init__(self, name, attr, unit_of_measurement=None, icon=None):
|
def __init__(self, name, attr, unit_of_measurement=None, icon=None):
|
||||||
@ -52,7 +52,7 @@ class EVSensorConfig(object):
|
|||||||
self.icon = icon
|
self.icon = icon
|
||||||
|
|
||||||
|
|
||||||
class EVBinarySensorConfig(object):
|
class EVBinarySensorConfig:
|
||||||
"""The EV binary sensor configuration."""
|
"""The EV binary sensor configuration."""
|
||||||
|
|
||||||
def __init__(self, name, attr, device_class=None):
|
def __init__(self, name, attr, device_class=None):
|
||||||
|
@ -25,7 +25,7 @@ def get_mysensors_devices(hass, domain):
|
|||||||
return hass.data[MYSENSORS_PLATFORM_DEVICES.format(domain)]
|
return hass.data[MYSENSORS_PLATFORM_DEVICES.format(domain)]
|
||||||
|
|
||||||
|
|
||||||
class MySensorsDevice(object):
|
class MySensorsDevice:
|
||||||
"""Representation of a MySensors device."""
|
"""Representation of a MySensors device."""
|
||||||
|
|
||||||
def __init__(self, gateway, node_id, child_id, name, value_type):
|
def __init__(self, gateway, node_id, child_id, name, value_type):
|
||||||
|
@ -118,7 +118,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class NeatoHub(object):
|
class NeatoHub:
|
||||||
"""A My Neato hub wrapper class."""
|
"""A My Neato hub wrapper class."""
|
||||||
|
|
||||||
def __init__(self, hass, domain_config, neato):
|
def __init__(self, hass, domain_config, neato):
|
||||||
|
@ -183,7 +183,7 @@ async def async_setup_entry(hass, entry):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class NestDevice(object):
|
class NestDevice:
|
||||||
"""Structure Nest functions for hass."""
|
"""Structure Nest functions for hass."""
|
||||||
|
|
||||||
def __init__(self, hass, conf, nest):
|
def __init__(self, hass, conf, nest):
|
||||||
|
@ -64,7 +64,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class CameraData(object):
|
class CameraData:
|
||||||
"""Get the latest data from Netatmo."""
|
"""Get the latest data from Netatmo."""
|
||||||
|
|
||||||
def __init__(self, auth, home=None):
|
def __init__(self, auth, home=None):
|
||||||
|
@ -174,7 +174,7 @@ def async_setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class BaseNotificationService(object):
|
class BaseNotificationService:
|
||||||
"""An abstract class for notification services."""
|
"""An abstract class for notification services."""
|
||||||
|
|
||||||
hass = None
|
hass = None
|
||||||
|
@ -56,7 +56,7 @@ def get_service(hass, config, discovery_info=None):
|
|||||||
return service
|
return service
|
||||||
|
|
||||||
|
|
||||||
class ApnsDevice(object):
|
class ApnsDevice:
|
||||||
"""
|
"""
|
||||||
The APNS Device class.
|
The APNS Device class.
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class NuimoLogger(object):
|
class NuimoLogger:
|
||||||
"""Handle Nuimo Controller event callbacks."""
|
"""Handle Nuimo Controller event callbacks."""
|
||||||
|
|
||||||
def __init__(self, hass, name):
|
def __init__(self, hass, name):
|
||||||
@ -167,7 +167,7 @@ HOMEASSIST_LOGO = (
|
|||||||
".........")
|
".........")
|
||||||
|
|
||||||
|
|
||||||
class DiscoveryLogger(object):
|
class DiscoveryLogger:
|
||||||
"""Handle Nuimo Discovery callbacks."""
|
"""Handle Nuimo Discovery callbacks."""
|
||||||
|
|
||||||
# pylint: disable=no-self-use
|
# pylint: disable=no-self-use
|
||||||
|
@ -50,7 +50,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class OctoPrintAPI(object):
|
class OctoPrintAPI:
|
||||||
"""Simple JSON wrapper for OctoPrint's API."""
|
"""Simple JSON wrapper for OctoPrint's API."""
|
||||||
|
|
||||||
def __init__(self, api_url, key, bed, number_of_tools):
|
def __init__(self, api_url, key, bed, number_of_tools):
|
||||||
|
@ -118,7 +118,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class CallRateDelayThrottle(object):
|
class CallRateDelayThrottle:
|
||||||
"""Helper class to provide service call rate throttling.
|
"""Helper class to provide service call rate throttling.
|
||||||
|
|
||||||
This class provides a decorator to decorate service methods that need
|
This class provides a decorator to decorate service methods that need
|
||||||
|
@ -324,7 +324,7 @@ class Plant(Entity):
|
|||||||
return attrib
|
return attrib
|
||||||
|
|
||||||
|
|
||||||
class DailyHistory(object):
|
class DailyHistory:
|
||||||
"""Stores one measurement per day for a maximum number of days.
|
"""Stores one measurement per day for a maximum number of days.
|
||||||
|
|
||||||
At the moment only the maximum value per day is kept.
|
At the moment only the maximum value per day is kept.
|
||||||
|
@ -55,7 +55,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class PrometheusMetrics(object):
|
class PrometheusMetrics:
|
||||||
"""Model all of the metrics which should be exposed to Prometheus."""
|
"""Model all of the metrics which should be exposed to Prometheus."""
|
||||||
|
|
||||||
def __init__(self, prometheus_client, entity_filter, namespace):
|
def __init__(self, prometheus_client, entity_filter, namespace):
|
||||||
|
@ -130,7 +130,7 @@ def setup(hass, config) -> bool:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class RachioPerson(object):
|
class RachioPerson:
|
||||||
"""Represent a Rachio user."""
|
"""Represent a Rachio user."""
|
||||||
|
|
||||||
def __init__(self, hass, rachio):
|
def __init__(self, hass, rachio):
|
||||||
@ -162,7 +162,7 @@ class RachioPerson(object):
|
|||||||
return self._controllers
|
return self._controllers
|
||||||
|
|
||||||
|
|
||||||
class RachioIro(object):
|
class RachioIro:
|
||||||
"""Represent a Rachio Iro."""
|
"""Represent a Rachio Iro."""
|
||||||
|
|
||||||
def __init__(self, hass, rachio, data):
|
def __init__(self, hass, rachio, data):
|
||||||
|
@ -124,7 +124,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class RainCloudHub(object):
|
class RainCloudHub:
|
||||||
"""Representation of a base RainCloud device."""
|
"""Representation of a base RainCloud device."""
|
||||||
|
|
||||||
def __init__(self, data):
|
def __init__(self, data):
|
||||||
|
@ -201,7 +201,7 @@ async def async_setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class RainMachine(object):
|
class RainMachine:
|
||||||
"""Define a generic RainMachine object."""
|
"""Define a generic RainMachine object."""
|
||||||
|
|
||||||
def __init__(self, client):
|
def __init__(self, client):
|
||||||
|
@ -63,7 +63,7 @@ class I2CHatsException(Exception):
|
|||||||
"""I2C-HATs exception."""
|
"""I2C-HATs exception."""
|
||||||
|
|
||||||
|
|
||||||
class I2CHatsDIScanner(object):
|
class I2CHatsDIScanner:
|
||||||
"""Scan Digital Inputs and fire callbacks."""
|
"""Scan Digital Inputs and fire callbacks."""
|
||||||
|
|
||||||
_DIGITAL_INPUTS = "di"
|
_DIGITAL_INPUTS = "di"
|
||||||
|
@ -138,7 +138,7 @@ def _register_new_account(hass, account_name, api_key, shared_secret,
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class RememberTheMilkConfiguration(object):
|
class RememberTheMilkConfiguration:
|
||||||
"""Internal configuration data for RememberTheMilk class.
|
"""Internal configuration data for RememberTheMilk class.
|
||||||
|
|
||||||
This class stores the authentication token it get from the backend.
|
This class stores the authentication token it get from the backend.
|
||||||
|
@ -60,7 +60,7 @@ def setup(hass, config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class SCSGate(object):
|
class SCSGate:
|
||||||
"""The class for dealing with the SCSGate device via scsgate.Reactor."""
|
"""The class for dealing with the SCSGate device via scsgate.Reactor."""
|
||||||
|
|
||||||
def __init__(self, device, logger):
|
def __init__(self, device, logger):
|
||||||
|
@ -248,7 +248,7 @@ class AirVisualSensor(Entity):
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
class AirVisualData(object):
|
class AirVisualData:
|
||||||
"""Define an object to hold sensor data."""
|
"""Define an object to hold sensor data."""
|
||||||
|
|
||||||
def __init__(self, client, **kwargs):
|
def __init__(self, client, **kwargs):
|
||||||
|
@ -158,7 +158,7 @@ class ArestSensor(Entity):
|
|||||||
return self.arest.available
|
return self.arest.available
|
||||||
|
|
||||||
|
|
||||||
class ArestData(object):
|
class ArestData:
|
||||||
"""The Class for handling the data retrieval for variables."""
|
"""The Class for handling the data retrieval for variables."""
|
||||||
|
|
||||||
def __init__(self, resource, pin=None):
|
def __init__(self, resource, pin=None):
|
||||||
|
@ -125,7 +125,7 @@ class BboxSensor(Entity):
|
|||||||
2)
|
2)
|
||||||
|
|
||||||
|
|
||||||
class BboxData(object):
|
class BboxData:
|
||||||
"""Get data from the Bbox."""
|
"""Get data from the Bbox."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user