Bump lacrosse-view to 1.1.1 (#137282)

pull/137319/head
IceBotYT 2025-02-05 07:09:59 -05:00 committed by GitHub
parent 83edee47ff
commit 41490dffad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 6 deletions

View File

@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/lacrosse_view",
"iot_class": "cloud_polling",
"loggers": ["lacrosse_view"],
"requirements": ["lacrosse-view==1.0.4"]
"requirements": ["lacrosse-view==1.1.1"]
}

View File

@ -45,7 +45,7 @@ class LaCrosseSensorEntityDescription(SensorEntityDescription):
def get_value(sensor: Sensor, field: str) -> float | int | str | None:
"""Get the value of a sensor field."""
field_data = sensor.data.get(field)
field_data = sensor.data.get(field) if sensor.data is not None else None
if field_data is None:
return None
value = field_data["values"][-1]["s"]
@ -178,7 +178,7 @@ async def async_setup_entry(
continue
# if the API returns a different unit of measurement from the description, update it
if sensor.data.get(field) is not None:
if sensor.data is not None and sensor.data.get(field) is not None:
native_unit_of_measurement = UNIT_OF_MEASUREMENT_MAP.get(
sensor.data[field].get("unit")
)
@ -240,7 +240,9 @@ class LaCrosseViewSensor(
@property
def available(self) -> bool:
"""Return True if entity is available."""
data = self.coordinator.data[self.index].data
return (
super().available
and self.entity_description.key in self.coordinator.data[self.index].data
and data is not None
and self.entity_description.key in data
)

2
requirements_all.txt generated
View File

@ -1284,7 +1284,7 @@ konnected==1.2.0
krakenex==2.2.2
# homeassistant.components.lacrosse_view
lacrosse-view==1.0.4
lacrosse-view==1.1.1
# homeassistant.components.eufy
lakeside==0.13

View File

@ -1086,7 +1086,7 @@ konnected==1.2.0
krakenex==2.2.2
# homeassistant.components.lacrosse_view
lacrosse-view==1.0.4
lacrosse-view==1.1.1
# homeassistant.components.laundrify
laundrify-aio==1.2.2