mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Bump version bsblan library to 0.4.0 (#42220)
This commit is contained in:
parent
20c43df768
commit
1340abb2fe
@ -28,7 +28,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
bsblan = BSBLan(
|
bsblan = BSBLan(
|
||||||
entry.data[CONF_HOST],
|
entry.data[CONF_HOST],
|
||||||
passkey=entry.data[CONF_PASSKEY],
|
passkey=entry.data[CONF_PASSKEY],
|
||||||
loop=hass.loop,
|
|
||||||
port=entry.data[CONF_PORT],
|
port=entry.data[CONF_PORT],
|
||||||
session=session,
|
session=session,
|
||||||
)
|
)
|
||||||
|
@ -94,14 +94,13 @@ class BSBLanClimate(ClimateEntity):
|
|||||||
"""Initialize BSBLan climate device."""
|
"""Initialize BSBLan climate device."""
|
||||||
self._current_temperature: Optional[float] = None
|
self._current_temperature: Optional[float] = None
|
||||||
self._available = True
|
self._available = True
|
||||||
self._current_hvac_mode: Optional[int] = None
|
self._hvac_mode: Optional[str] = None
|
||||||
self._target_temperature: Optional[float] = None
|
self._target_temperature: Optional[float] = None
|
||||||
self._info: Info = info
|
|
||||||
self.bsblan = bsblan
|
|
||||||
self._temperature_unit = None
|
self._temperature_unit = None
|
||||||
self._hvac_mode = None
|
|
||||||
self._preset_mode = None
|
self._preset_mode = None
|
||||||
self._store_hvac_mode = None
|
self._store_hvac_mode = None
|
||||||
|
self._info: Info = info
|
||||||
|
self.bsblan = bsblan
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
@ -138,7 +137,7 @@ class BSBLanClimate(ClimateEntity):
|
|||||||
@property
|
@property
|
||||||
def hvac_mode(self):
|
def hvac_mode(self):
|
||||||
"""Return the current operation mode."""
|
"""Return the current operation mode."""
|
||||||
return self._current_hvac_mode
|
return self._hvac_mode
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hvac_modes(self):
|
def hvac_modes(self):
|
||||||
@ -165,10 +164,10 @@ class BSBLanClimate(ClimateEntity):
|
|||||||
_LOGGER.debug("Setting preset mode to: %s", preset_mode)
|
_LOGGER.debug("Setting preset mode to: %s", preset_mode)
|
||||||
if preset_mode == PRESET_NONE:
|
if preset_mode == PRESET_NONE:
|
||||||
# restore previous hvac mode
|
# restore previous hvac mode
|
||||||
self._current_hvac_mode = self._store_hvac_mode
|
self._hvac_mode = self._store_hvac_mode
|
||||||
else:
|
else:
|
||||||
# Store hvac mode.
|
# Store hvac mode.
|
||||||
self._store_hvac_mode = self._current_hvac_mode
|
self._store_hvac_mode = self._hvac_mode
|
||||||
await self.async_set_data(preset_mode=preset_mode)
|
await self.async_set_data(preset_mode=preset_mode)
|
||||||
|
|
||||||
async def async_set_hvac_mode(self, hvac_mode):
|
async def async_set_hvac_mode(self, hvac_mode):
|
||||||
@ -216,18 +215,18 @@ class BSBLanClimate(ClimateEntity):
|
|||||||
|
|
||||||
self._available = True
|
self._available = True
|
||||||
|
|
||||||
self._current_temperature = float(state.current_temperature)
|
self._current_temperature = float(state.current_temperature.value)
|
||||||
self._target_temperature = float(state.target_temperature)
|
self._target_temperature = float(state.target_temperature.value)
|
||||||
|
|
||||||
# check if preset is active else get hvac mode
|
# check if preset is active else get hvac mode
|
||||||
_LOGGER.debug("state hvac/preset mode: %s", state.current_hvac_mode)
|
_LOGGER.debug("state hvac/preset mode: %s", state.hvac_mode.value)
|
||||||
if state.current_hvac_mode == "2":
|
if state.hvac_mode.value == "2":
|
||||||
self._preset_mode = PRESET_ECO
|
self._preset_mode = PRESET_ECO
|
||||||
else:
|
else:
|
||||||
self._current_hvac_mode = BSBLAN_TO_HA_STATE[state.current_hvac_mode]
|
self._hvac_mode = BSBLAN_TO_HA_STATE[state.hvac_mode.value]
|
||||||
self._preset_mode = PRESET_NONE
|
self._preset_mode = PRESET_NONE
|
||||||
|
|
||||||
self._temperature_unit = state.temperature_unit
|
self._temperature_unit = state.current_temperature.unit
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_info(self) -> Dict[str, Any]:
|
def device_info(self) -> Dict[str, Any]:
|
||||||
|
@ -75,7 +75,5 @@ class BSBLanFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
"""Get device information from an BSBLan device."""
|
"""Get device information from an BSBLan device."""
|
||||||
session = async_get_clientsession(self.hass)
|
session = async_get_clientsession(self.hass)
|
||||||
_LOGGER.debug("request bsblan.info:")
|
_LOGGER.debug("request bsblan.info:")
|
||||||
bsblan = BSBLan(
|
bsblan = BSBLan(host, passkey=passkey, port=port, session=session)
|
||||||
host, passkey=passkey, port=port, session=session, loop=self.hass.loop
|
|
||||||
)
|
|
||||||
return await bsblan.info()
|
return await bsblan.info()
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
"name": "BSB-Lan",
|
"name": "BSB-Lan",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/bsblan",
|
"documentation": "https://www.home-assistant.io/integrations/bsblan",
|
||||||
"requirements": ["bsblan==0.3.7"],
|
"requirements": ["bsblan==0.4.0"],
|
||||||
"codeowners": ["@liudger"]
|
"codeowners": ["@liudger"]
|
||||||
}
|
}
|
||||||
|
@ -392,7 +392,7 @@ brottsplatskartan==0.0.1
|
|||||||
brunt==0.1.3
|
brunt==0.1.3
|
||||||
|
|
||||||
# homeassistant.components.bsblan
|
# homeassistant.components.bsblan
|
||||||
bsblan==0.3.7
|
bsblan==0.4.0
|
||||||
|
|
||||||
# homeassistant.components.bluetooth_tracker
|
# homeassistant.components.bluetooth_tracker
|
||||||
bt_proximity==0.2
|
bt_proximity==0.2
|
||||||
|
@ -210,7 +210,7 @@ broadlink==0.15.0
|
|||||||
brother==0.1.18
|
brother==0.1.18
|
||||||
|
|
||||||
# homeassistant.components.bsblan
|
# homeassistant.components.bsblan
|
||||||
bsblan==0.3.7
|
bsblan==0.4.0
|
||||||
|
|
||||||
# homeassistant.components.buienradar
|
# homeassistant.components.buienradar
|
||||||
buienradar==1.0.4
|
buienradar==1.0.4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user