mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Bump lacrosse-view to 1.1.1 (#137282)
This commit is contained in:
parent
83edee47ff
commit
41490dffad
@ -6,5 +6,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/lacrosse_view",
|
"documentation": "https://www.home-assistant.io/integrations/lacrosse_view",
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"loggers": ["lacrosse_view"],
|
"loggers": ["lacrosse_view"],
|
||||||
"requirements": ["lacrosse-view==1.0.4"]
|
"requirements": ["lacrosse-view==1.1.1"]
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ class LaCrosseSensorEntityDescription(SensorEntityDescription):
|
|||||||
|
|
||||||
def get_value(sensor: Sensor, field: str) -> float | int | str | None:
|
def get_value(sensor: Sensor, field: str) -> float | int | str | None:
|
||||||
"""Get the value of a sensor field."""
|
"""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:
|
if field_data is None:
|
||||||
return None
|
return None
|
||||||
value = field_data["values"][-1]["s"]
|
value = field_data["values"][-1]["s"]
|
||||||
@ -178,7 +178,7 @@ async def async_setup_entry(
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# if the API returns a different unit of measurement from the description, update it
|
# 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(
|
native_unit_of_measurement = UNIT_OF_MEASUREMENT_MAP.get(
|
||||||
sensor.data[field].get("unit")
|
sensor.data[field].get("unit")
|
||||||
)
|
)
|
||||||
@ -240,7 +240,9 @@ class LaCrosseViewSensor(
|
|||||||
@property
|
@property
|
||||||
def available(self) -> bool:
|
def available(self) -> bool:
|
||||||
"""Return True if entity is available."""
|
"""Return True if entity is available."""
|
||||||
|
data = self.coordinator.data[self.index].data
|
||||||
return (
|
return (
|
||||||
super().available
|
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
2
requirements_all.txt
generated
@ -1284,7 +1284,7 @@ konnected==1.2.0
|
|||||||
krakenex==2.2.2
|
krakenex==2.2.2
|
||||||
|
|
||||||
# homeassistant.components.lacrosse_view
|
# homeassistant.components.lacrosse_view
|
||||||
lacrosse-view==1.0.4
|
lacrosse-view==1.1.1
|
||||||
|
|
||||||
# homeassistant.components.eufy
|
# homeassistant.components.eufy
|
||||||
lakeside==0.13
|
lakeside==0.13
|
||||||
|
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@ -1086,7 +1086,7 @@ konnected==1.2.0
|
|||||||
krakenex==2.2.2
|
krakenex==2.2.2
|
||||||
|
|
||||||
# homeassistant.components.lacrosse_view
|
# homeassistant.components.lacrosse_view
|
||||||
lacrosse-view==1.0.4
|
lacrosse-view==1.1.1
|
||||||
|
|
||||||
# homeassistant.components.laundrify
|
# homeassistant.components.laundrify
|
||||||
laundrify-aio==1.2.2
|
laundrify-aio==1.2.2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user