Skip to content

Commit

Permalink
bump 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
magnuselden authored and magnuselden committed Jun 22, 2022
1 parent 7177ba9 commit 2eb89e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/peaqev/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"documentation": "https://github.com/elden1337/hass-peaq",
"issue_tracker": "https://github.com/elden1337/hass-peaq/issues",
"requirements": [
"peaqevcore>=2.0.0"
"peaqevcore>=2.0.2"
],
"codeowners": [
"@elden1337"
],
"version": "1.1.0",
"version": "1.1.1",
"iot_class": "calculated",
"dependencies": [
"recorder",
Expand Down
4 changes: 4 additions & 0 deletions custom_components/peaqev/sensors/money_sensor.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import logging
from datetime import datetime

from custom_components.peaqev.peaqservice.util.constants import HOURCONTROLLER
from custom_components.peaqev.sensors.sensorbase import SensorBase

_LOGGER = logging.getLogger(__name__)

class PeaqMoneySensor(SensorBase):
"""Special sensor which is only created if priceaware is true"""
Expand Down Expand Up @@ -50,6 +52,7 @@ def extra_state_attributes(self) -> dict:
def _get_written_state(self) -> str:
hour = datetime.now().hour
ret = ""

if hour in self._nonhours:
for idx, h in enumerate(self._nonhours):
if idx + 1 < len(self._nonhours):
Expand All @@ -64,6 +67,7 @@ def _get_written_state(self) -> str:
ret = f"Charging allowed at {int(val * 100)}% of peak"
else:
ret = "Charging allowed"
#_LOGGER.debug(f"nonhours: {self._nonhours}, ret:{ret}")
return ret

def _get_stopped_string(self, h) -> str:
Expand Down

0 comments on commit 2eb89e5

Please sign in to comment.