8000 Add hive heat on demand by KJonline · Pull Request #48591 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add hive heat on demand #48591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions homeassistant/components/hive/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,18 @@ async def async_set_temperature(self, **kwargs):
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)
2 changes: 1 addition & 1 deletion homeassistant/components/hive/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/hive/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def extra_state_attributes(self):
@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):
Expand All @@ -83,4 +83,4 @@ async def async_turn_off(self, **kwargs):
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)
2 changes: 1 addition & 1 deletion homeassistant/components/hive/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ async def async_hot_water_boost(self, time_period, on_off):
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)
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,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
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
0