Fix Shelly 1/1PM external temperature sensor unavailable (#65096)

pull/65105/head
Shay Levy 2022-01-28 08:33:12 +02:00 committed by GitHub
parent e591393f01
commit 631c4bf10f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -223,7 +223,7 @@ SENSORS: Final = {
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
available=lambda block: cast(int, block.extTemp) != 999
and not block.sensorError,
and not getattr(block, "sensorError", False),
),
("sensor", "humidity"): BlockSensorDescription(
key="sensor|humidity",
@ -233,7 +233,7 @@ SENSORS: Final = {
device_class=SensorDeviceClass.HUMIDITY,
state_class=SensorStateClass.MEASUREMENT,
available=lambda block: cast(int, block.humidity) != 999
and not block.sensorError,
and not getattr(block, "sensorError", False),
),
("sensor", "luminosity"): BlockSensorDescription(
key="sensor|luminosity",