Add hive heat on demand (#48591)
This commit is contained in:
parent
ebb369e008
commit
6482800724
6 changed files with 10 additions and 10 deletions
|
@ -192,18 +192,18 @@ class HiveClimateEntity(HiveEntity, ClimateEntity):
|
|||
async def async_set_preset_mode(self, preset_mode):
|
||||
"""Set new preset mode."""
|
||||
if preset_mode == PRESET_NONE and self.preset_mode == PRESET_BOOST:
|
||||
await self.hive.heating.turnBoostOff(self.device)
|
||||
await self.hive.heating.setBoostOff(self.device)
|
||||
elif preset_mode == PRESET_BOOST:
|
||||
curtemp = round(self.current_temperature * 2) / 2
|
||||
temperature = curtemp + 0.5
|
||||
await self.hive.heating.turnBoostOn(self.device, 30, temperature)
|
||||
await self.hive.heating.setBoostOn(self.device, 30, temperature)
|
||||
|
||||
@refresh_system
|
||||
async def async_heating_boost(self, time_period, temperature):
|
||||
"""Handle boost heating service call."""
|
||||
await self.hive.heating.turnBoostOn(self.device, time_period, temperature)
|
||||
await self.hive.heating.setBoostOn(self.device, time_period, temperature)
|
||||
|
||||
async def async_update(self):
|
||||
"""Update all Node data from Hive."""
|
||||
await self.hive.session.updateData(self.device)
|
||||
self.device = await self.hive.heating.getHeating(self.device)
|
||||
self.device = await self.hive.heating.getClimate(self.device)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/hive",
|
||||
"requirements": [
|
||||
"pyhiveapi==0.3.9"
|
||||
"pyhiveapi==0.4.1"
|
||||
],
|
||||
"codeowners": [
|
||||
"@Rendili",
|
||||
|
|
|
@ -63,7 +63,7 @@ class HiveDevicePlug(HiveEntity, SwitchEntity):
|
|||
@property
|
||||
def current_power_w(self):
|
||||
"""Return the current power usage in W."""
|
||||
return self.device["status"]["power_usage"]
|
||||
return self.device["status"].get("power_usage")
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
|
@ -83,4 +83,4 @@ class HiveDevicePlug(HiveEntity, SwitchEntity):
|
|||
async def async_update(self):
|
||||
"""Update all Node data from Hive."""
|
||||
await self.hive.session.updateData(self.device)
|
||||
self.device = await self.hive.switch.getPlug(self.device)
|
||||
self.device = await self.hive.switch.getSwitch(self.device)
|
||||
|
|
|
@ -146,4 +146,4 @@ class HiveWaterHeater(HiveEntity, WaterHeaterEntity):
|
|||
async def async_update(self):
|
||||
"""Update all Node data from Hive."""
|
||||
await self.hive.session.updateData(self.device)
|
||||
self.device = await self.hive.hotwater.getHotwater(self.device)
|
||||
self.device = await self.hive.hotwater.getWaterHeater(self.device)
|
||||
|
|
|
@ -1428,7 +1428,7 @@ pyheos==0.7.2
|
|||
pyhik==0.2.8
|
||||
|
||||
# homeassistant.components.hive
|
||||
pyhiveapi==0.3.9
|
||||
pyhiveapi==0.4.1
|
||||
|
||||
# homeassistant.components.homematic
|
||||
pyhomematic==0.1.72
|
||||
|
|
|
@ -757,7 +757,7 @@ pyhaversion==21.3.0
|
|||
pyheos==0.7.2
|
||||
|
||||
# homeassistant.components.hive
|
||||
pyhiveapi==0.3.9
|
||||
pyhiveapi==0.4.1
|
||||
|
||||
# homeassistant.components.homematic
|
||||
pyhomematic==0.1.72
|
||||
|
|
Loading…
Add table
Reference in a new issue