Skip to content

Commit

Permalink
change €/kWh to EUR/kWh
Browse files Browse the repository at this point in the history
For compatibilty with influxdb/grafana dashboarding
  • Loading branch information
Jan C committed Jul 1, 2022
1 parent 177d129 commit fbbee48
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion custom_components/ecopower_dynamic_grid_prices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ async def async_get_data(self, url) -> dict:
if zulutime.day > res['lastday']: res['lastday'] = zulutime.day
#_LOGGER.info(f"fetched from ecopower: {res}")
_LOGGER.info(f"fetched from ecopower: lastday: {res['lastday']}")
return res
return res
except CancelledError:
_LOGGER.exception(f"cancelled error received during {url} fetch")
# cleanup
raise
except Exception as exception:
_LOGGER.exception(f"cannot fetch api data from ecopower: {exception}")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "ecopower_dynamic_grid_prices",
"name": "EcopowerPrices",
"version": "0.0.4",
"version": "0.0.5",
"config_flow": true,
"documentation": "https://github.com/infradom/ecopower_dynamic_grid_prices",
"issue_tracker": "https://github.com/infradom/ecopower_dynamic_grid_prices/issues",
Expand Down
5 changes: 4 additions & 1 deletion custom_components/ecopower_dynamic_grid_prices/sensor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Sensor platform for integration_blueprint."""
from homeassistant.components.sensor import SensorEntity
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from homeassistant.const import CURRENCY_EURO, ENERGY_KILO_WATT_HOUR, ENERGY_MEGA_WATT_HOUR
from homeassistant.const import ENERGY_KILO_WATT_HOUR, ENERGY_MEGA_WATT_HOUR
from homeassistant.util import dt
from dataclasses import dataclass
from statistics import mean
Expand All @@ -19,6 +19,9 @@
from .const import PEAKHOURS, OFFPEAKHOURS1, OFFPEAKHOURS2
import logging

#from homeassistant.const import CURRENCY_EURO
CURRENCY_EURO = "EUR" # € sign was not treated well in grafana/influx

_LOGGER = logging.getLogger(__name__)


Expand Down

0 comments on commit fbbee48

Please sign in to comment.