mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Fix motion_blinds gateway signal strength sensor (#48866)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
aaa9367554
commit
2dc46d4516
@ -183,10 +183,14 @@ class MotionSignalStrengthSensor(CoordinatorEntity, SensorEntity):
|
|||||||
if self.coordinator.data is None:
|
if self.coordinator.data is None:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not self.coordinator.data[KEY_GATEWAY][ATTR_AVAILABLE]:
|
gateway_available = self.coordinator.data[KEY_GATEWAY][ATTR_AVAILABLE]
|
||||||
return False
|
if self._device_type == TYPE_GATEWAY:
|
||||||
|
return gateway_available
|
||||||
|
|
||||||
return self.coordinator.data[self._device.mac][ATTR_AVAILABLE]
|
return (
|
||||||
|
gateway_available
|
||||||
|
and self.coordinator.data[self._device.mac][ATTR_AVAILABLE]
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unit_of_measurement(self):
|
def unit_of_measurement(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user