Skip to content

Commit

Permalink
Fixed hot water boost switch for VRC700
Browse files Browse the repository at this point in the history
  • Loading branch information
signalkraft committed Feb 9, 2024
1 parent d37e75b commit 0f479d9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
10 changes: 5 additions & 5 deletions custom_components/mypyllant/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
HolidayEntity,
DomesticHotWaterCoordinatorEntity,
)
from myPyllant.enums import DHWCurrentSpecialFunction
from myPyllant.enums import DHWCurrentSpecialFunction, DHWCurrentSpecialFunctionVRC700
from myPyllant.utils import get_default_holiday_dates

_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -77,10 +77,10 @@ def name(self):

@property
def is_on(self):
return (
self.domestic_hot_water.current_special_function
== DHWCurrentSpecialFunction.CYLINDER_BOOST
)
return self.domestic_hot_water.current_special_function in [
DHWCurrentSpecialFunction.CYLINDER_BOOST,
DHWCurrentSpecialFunctionVRC700.CYLINDER_BOOST,
]

async def async_turn_on(self, **kwargs):
await self.coordinator.api.boost_domestic_hot_water(
Expand Down
7 changes: 7 additions & 0 deletions scripts/update-mypyllant
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

cd "$(dirname "$0")/.."
VERSION=$(git --git-dir=../myPyllant/.git describe --abbrev=0 --tags)
grep -rl "myPyllant==[0-9]" . --exclude-dir=.venv --exclude-dir=.git | xargs sed -i -E "s/myPyllant==[0-9]+.[0-9]+.[0-9]+b?[0-9]*/myPyllant==${VERSION/v/''}/g"

0 comments on commit 0f479d9

Please sign in to comment.