mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 06:17:07 +00:00
Check before casting to float & add integration type to bsblan (#97210)
This commit is contained in:
parent
8d6c4e3306
commit
c2f9070f40
@ -106,6 +106,10 @@ class BSBLANClimate(
|
|||||||
@property
|
@property
|
||||||
def current_temperature(self) -> float | None:
|
def current_temperature(self) -> float | None:
|
||||||
"""Return the current temperature."""
|
"""Return the current temperature."""
|
||||||
|
if self.coordinator.data.current_temperature.value == "---":
|
||||||
|
# device returns no current temperature
|
||||||
|
return None
|
||||||
|
|
||||||
return float(self.coordinator.data.current_temperature.value)
|
return float(self.coordinator.data.current_temperature.value)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
"codeowners": ["@liudger"],
|
"codeowners": ["@liudger"],
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/bsblan",
|
"documentation": "https://www.home-assistant.io/integrations/bsblan",
|
||||||
|
"integration_type": "device",
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"loggers": ["bsblan"],
|
"loggers": ["bsblan"],
|
||||||
"requirements": ["python-bsblan==0.5.11"]
|
"requirements": ["python-bsblan==0.5.11"]
|
||||||
|
@ -703,7 +703,7 @@
|
|||||||
},
|
},
|
||||||
"bsblan": {
|
"bsblan": {
|
||||||
"name": "BSB-Lan",
|
"name": "BSB-Lan",
|
||||||
"integration_type": "hub",
|
"integration_type": "device",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"iot_class": "local_polling"
|
"iot_class": "local_polling"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user