mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 22:07:10 +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
|
||||
def current_temperature(self) -> float | None:
|
||||
"""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)
|
||||
|
||||
@property
|
||||
|
@ -4,6 +4,7 @@
|
||||
"codeowners": ["@liudger"],
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/bsblan",
|
||||
"integration_type": "device",
|
||||
"iot_class": "local_polling",
|
||||
"loggers": ["bsblan"],
|
||||
"requirements": ["python-bsblan==0.5.11"]
|
||||
|
@ -703,7 +703,7 @@
|
||||
},
|
||||
"bsblan": {
|
||||
"name": "BSB-Lan",
|
||||
"integration_type": "hub",
|
||||
"integration_type": "device",
|
||||
"config_flow": true,
|
||||
"iot_class": "local_polling"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user