Revert "Revert "Bump pypck to 0.7.8"" (#44885)

This reverts commit 6de8824980.
pull/44897/head
Franck Nijhof 2021-01-06 18:01:06 +01:00 committed by GitHub
parent 1a44a8a714
commit 92431049e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 36 additions and 20 deletions

View File

@ -139,7 +139,8 @@ class LcnEntity(Entity):
async def async_added_to_hass(self):
"""Run when entity about to be added to hass."""
self.device_connection.register_for_inputs(self.input_received)
if not self.device_connection.is_group:
self.device_connection.register_for_inputs(self.input_received)
@property
def name(self):

View File

@ -50,9 +50,10 @@ class LcnRegulatorLockSensor(LcnEntity, BinarySensorEntity):
async def async_added_to_hass(self):
"""Run when entity about to be added to hass."""
await super().async_added_to_hass()
await self.device_connection.activate_status_request_handler(
self.setpoint_variable
)
if not self.device_connection.is_group:
await self.device_connection.activate_status_request_handler(
self.setpoint_variable
)
@property
def is_on(self):
@ -85,9 +86,10 @@ class LcnBinarySensor(LcnEntity, BinarySensorEntity):
async def async_added_to_hass(self):
"""Run when entity about to be added to hass."""
await super().async_added_to_hass()
await self.device_connection.activate_status_request_handler(
self.bin_sensor_port
)
if not self.device_connection.is_group:
await self.device_connection.activate_status_request_handler(
self.bin_sensor_port
)
@property
def is_on(self):
@ -116,7 +118,8 @@ class LcnLockKeysSensor(LcnEntity, BinarySensorEntity):
async def async_added_to_hass(self):
"""Run when entity about to be added to hass."""
await super().async_added_to_hass()
await self.device_connection.activate_status_request_handler(self.source)
if not self.device_connection.is_group:
await self.device_connection.activate_status_request_handler(self.source)
@property
def is_on(self):

View File

@ -63,8 +63,9 @@ class LcnClimate(LcnEntity, ClimateEntity):
async def async_added_to_hass(self):
"""Run when entity about to be added to hass."""
await super().async_added_to_hass()
await self.device_connection.activate_status_request_handler(self.variable)
await self.device_connection.activate_status_request_handler(self.setpoint)
if not self.device_connection.is_group:
await self.device_connection.activate_status_request_handler(self.variable)
await self.device_connection.activate_status_request_handler(self.setpoint)
@property
def supported_features(self):

View File

@ -161,7 +161,8 @@ class LcnRelayCover(LcnEntity, CoverEntity):
async def async_added_to_hass(self):
"""Run when entity about to be added to hass."""
await super().async_added_to_hass()
await self.device_connection.activate_status_request_handler(self.motor)
if not self.device_connection.is_group:
await self.device_connection.activate_status_request_handler(self.motor)
@property
def is_closed(self):

View File

@ -68,7 +68,8 @@ class LcnOutputLight(LcnEntity, LightEntity):
async def async_added_to_hass(self):
"""Run when entity about to be added to hass."""
await super().async_added_to_hass()
await self.device_connection.activate_status_request_handler(self.output)
if not self.device_connection.is_group:
await self.device_connection.activate_status_request_handler(self.output)
@property
def supported_features(self):
@ -155,7 +156,8 @@ class LcnRelayLight(LcnEntity, LightEntity):
async def async_added_to_hass(self):
"""Run when entity about to be added to hass."""
await super().async_added_to_hass()
await self.device_connection.activate_status_request_handler(self.output)
if not self.device_connection.is_group:
await self.device_connection.activate_status_request_handler(self.output)
@property
def is_on(self):

View File

@ -2,6 +2,10 @@
"domain": "lcn",
"name": "LCN",
"documentation": "https://www.home-assistant.io/integrations/lcn",
"requirements": ["pypck==0.7.7"],
"codeowners": ["@alengwenus"]
"requirements": [
"pypck==0.7.8"
],
"codeowners": [
"@alengwenus"
]
}

View File

@ -57,7 +57,8 @@ class LcnVariableSensor(LcnEntity):
async def async_added_to_hass(self):
"""Run when entity about to be added to hass."""
await super().async_added_to_hass()
await self.device_connection.activate_status_request_handler(self.variable)
if not self.device_connection.is_group:
await self.device_connection.activate_status_request_handler(self.variable)
@property
def state(self):
@ -98,7 +99,8 @@ class LcnLedLogicSensor(LcnEntity):
async def async_added_to_hass(self):
"""Run when entity about to be added to hass."""
await super().async_added_to_hass()
await self.device_connection.activate_status_request_handler(self.source)
if not self.device_connection.is_group:
await self.device_connection.activate_status_request_handler(self.source)
@property
def state(self):

View File

@ -50,7 +50,8 @@ class LcnOutputSwitch(LcnEntity, SwitchEntity):
async def async_added_to_hass(self):
"""Run when entity about to be added to hass."""
await super().async_added_to_hass()
await self.device_connection.activate_status_request_handler(self.output)
if not self.device_connection.is_group:
await self.device_connection.activate_status_request_handler(self.output)
@property
def is_on(self):
@ -97,7 +98,8 @@ class LcnRelaySwitch(LcnEntity, SwitchEntity):
async def async_added_to_hass(self):
"""Run when entity about to be added to hass."""
await super().async_added_to_hass()
await self.device_connection.activate_status_request_handler(self.output)
if not self.device_connection.is_group:
await self.device_connection.activate_status_request_handler(self.output)
@property
def is_on(self):

View File

@ -1607,7 +1607,7 @@ pyownet==0.10.0.post1
pypca==0.0.7
# homeassistant.components.lcn
pypck==0.7.7
pypck==0.7.8
# homeassistant.components.pjlink
pypjlink2==1.2.1