mirror of
https://github.com/home-assistant/core.git
synced 2025-08-13 17:45:19 +02:00
Format long lines
This commit is contained in:
@@ -47,9 +47,11 @@ class InsteonPLMBinarySensor(BinarySensorDevice):
|
|||||||
self._hass = hass
|
self._hass = hass
|
||||||
self._insteon_device_state = device.states[state_key]
|
self._insteon_device_state = device.states[state_key]
|
||||||
self._insteon_device = device
|
self._insteon_device = device
|
||||||
self._sensor_type = SENSOR_TYPES.get(self._insteon_device_state.name, None)
|
self._sensor_type = SENSOR_TYPES.get(self._insteon_device_state.name,
|
||||||
|
None)
|
||||||
|
|
||||||
self._insteon_device_state.register_updates(self.async_binarysensor_update)
|
self._insteon_device_state.register_updates(
|
||||||
|
self.async_binarysensor_update)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def should_poll(self):
|
def should_poll(self):
|
||||||
@@ -68,14 +70,16 @@ class InsteonPLMBinarySensor(BinarySensorDevice):
|
|||||||
if self._insteon_device_state.group == 0x01:
|
if self._insteon_device_state.group == 0x01:
|
||||||
name = self._insteon_device.id
|
name = self._insteon_device.id
|
||||||
else:
|
else:
|
||||||
name = '{:s}_{:d}'.format(self._insteon_device.id, self._insteon_device_state.group)
|
name = '{:s}_{:d}'.format(self._insteon_device.id,
|
||||||
|
self._insteon_device_state.group)
|
||||||
return name
|
return name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Provide attributes for display on device card."""
|
"""Provide attributes for display on device card."""
|
||||||
insteon_plm = get_component('insteon_plm')
|
insteon_plm = get_component('insteon_plm')
|
||||||
return insteon_plm.common_attributes(self._insteon_device, self._insteon_device_state)
|
return insteon_plm.common_attributes(self._insteon_device,
|
||||||
|
self._insteon_device_state)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_binarysensor_update(self, deviceid, statename, val):
|
def async_binarysensor_update(self, deviceid, statename, val):
|
||||||
|
@@ -77,14 +77,16 @@ class InsteonPLMFan(FanEntity):
|
|||||||
if self._insteon_device_state.group == 0x01:
|
if self._insteon_device_state.group == 0x01:
|
||||||
name = self._insteon_device.id
|
name = self._insteon_device.id
|
||||||
else:
|
else:
|
||||||
name = '{:s}_{:d}'.format(self._insteon_device.id, self._insteon_device_state.group)
|
name = '{:s}_{:d}'.format(self._insteon_device.id,
|
||||||
|
self._insteon_device_state.group)
|
||||||
return name
|
return name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Provide attributes for display on device card."""
|
"""Provide attributes for display on device card."""
|
||||||
insteon_plm = get_component('insteon_plm')
|
insteon_plm = get_component('insteon_plm')
|
||||||
return insteon_plm.common_attributes(self._insteon_device, self._insteon_device_state)
|
return insteon_plm.common_attributes(self._insteon_device,
|
||||||
|
self._insteon_device_state)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def speed(self) -> str:
|
def speed(self) -> str:
|
||||||
|
@@ -66,7 +66,8 @@ class InsteonPLMDimmerDevice(Light):
|
|||||||
if self._insteon_device_state.group == 0x01:
|
if self._insteon_device_state.group == 0x01:
|
||||||
name = self._insteon_device.id
|
name = self._insteon_device.id
|
||||||
else:
|
else:
|
||||||
name = '{:s}_{:d}'.format(self._insteon_device.id, self._insteon_device_state.group)
|
name = '{:s}_{:d}'.format(self._insteon_device.id,
|
||||||
|
self._insteon_device_state.group)
|
||||||
return name
|
return name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -89,7 +90,8 @@ class InsteonPLMDimmerDevice(Light):
|
|||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Provide attributes for display on device card."""
|
"""Provide attributes for display on device card."""
|
||||||
insteon_plm = get_component('insteon_plm')
|
insteon_plm = get_component('insteon_plm')
|
||||||
return insteon_plm.common_attributes(self._insteon_device, self._insteon_device_state)
|
return insteon_plm.common_attributes(self._insteon_device,
|
||||||
|
self._insteon_device_state)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_light_update(self, entity_id, statename, val):
|
def async_light_update(self, entity_id, statename, val):
|
||||||
|
@@ -63,7 +63,8 @@ class InsteonPLMSensorDevice(Entity):
|
|||||||
if self._insteon_device_state.group == 0x01:
|
if self._insteon_device_state.group == 0x01:
|
||||||
name = self._insteon_device.id
|
name = self._insteon_device.id
|
||||||
else:
|
else:
|
||||||
name = '{:s}_{:d}'.format(self._insteon_device.id, self._insteon_device_state.group)
|
name = '{:s}_{:d}'.format(self._insteon_device.id,
|
||||||
|
self._insteon_device_state.group)
|
||||||
return name
|
return name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -76,7 +77,8 @@ class InsteonPLMSensorDevice(Entity):
|
|||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Provide attributes for display on device card."""
|
"""Provide attributes for display on device card."""
|
||||||
insteon_plm = get_component('insteon_plm')
|
insteon_plm = get_component('insteon_plm')
|
||||||
return insteon_plm.common_attributes(self._insteon_device, self._insteon_device_state)
|
return insteon_plm.common_attributes(self._insteon_device,
|
||||||
|
self._insteon_device_state)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_sensor_update(self, deviceid, statename, val):
|
def async_sensor_update(self, deviceid, statename, val):
|
||||||
|
@@ -70,7 +70,8 @@ class InsteonPLMSwitchDevice(SwitchDevice):
|
|||||||
if self._insteon_device_state.group == 0x01:
|
if self._insteon_device_state.group == 0x01:
|
||||||
name = self._insteon_device.id
|
name = self._insteon_device.id
|
||||||
else:
|
else:
|
||||||
name = '{:s}_{:d}'.format(self._insteon_device.id, self._insteon_device_state.group)
|
name = '{:s}_{:d}'.format(self._insteon_device.id,
|
||||||
|
self._insteon_device_state.group)
|
||||||
return name
|
return name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -83,7 +84,8 @@ class InsteonPLMSwitchDevice(SwitchDevice):
|
|||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Provide attributes for display on device card."""
|
"""Provide attributes for display on device card."""
|
||||||
insteon_plm = get_component('insteon_plm')
|
insteon_plm = get_component('insteon_plm')
|
||||||
return insteon_plm.common_attributes(self._insteon_device, self._insteon_device_state)
|
return insteon_plm.common_attributes(self._insteon_device,
|
||||||
|
self._insteon_device_state)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_switch_update(self, deviceid, statename, val):
|
def async_switch_update(self, deviceid, statename, val):
|
||||||
@@ -129,7 +131,8 @@ class InsteonPLMOpenClosedDevice(SwitchDevice):
|
|||||||
if self._insteon_device_state.group == 0x01:
|
if self._insteon_device_state.group == 0x01:
|
||||||
name = self._insteon_device.id
|
name = self._insteon_device.id
|
||||||
else:
|
else:
|
||||||
name = '{:s}_{:d}'.format(self._insteon_device.id, self._insteon_device_state.group)
|
name = '{:s}_{:d}'.format(self._insteon_device.id,
|
||||||
|
self._insteon_device_state.group)
|
||||||
return name
|
return name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -142,7 +145,8 @@ class InsteonPLMOpenClosedDevice(SwitchDevice):
|
|||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Provide attributes for display on device card."""
|
"""Provide attributes for display on device card."""
|
||||||
insteon_plm = get_component('insteon_plm')
|
insteon_plm = get_component('insteon_plm')
|
||||||
return insteon_plm.common_attributes(self._insteon_device, self._insteon_device_state)
|
return insteon_plm.common_attributes(self._insteon_device,
|
||||||
|
self._insteon_device_state)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def async_relay_update(self, deviceid, statename, val):
|
def async_relay_update(self, deviceid, statename, val):
|
||||||
|
Reference in New Issue
Block a user