diff --git a/pycheckwatt/__init__.py b/pycheckwatt/__init__.py index 277d23b..a2742ce 100644 --- a/pycheckwatt/__init__.py +++ b/pycheckwatt/__init__.py @@ -782,6 +782,26 @@ def battery_power(self): _LOGGER.warning("Unable to retrieve Battery Power") return None + @property + def grid_power(self): + """Property for Grid Power.""" + if self.energy_data is not None: + if "GridNow" in self.energy_data: + return self.energy_data["GridNow"] + + _LOGGER.warning("Unable to retrieve Grid Power") + return None + + @property + def solar_power(self): + """Property for Solar Power.""" + if self.energy_data is not None: + if "SolarNow" in self.energy_data: + return self.energy_data["SolarNow"] + + _LOGGER.warning("Unable to retrieve Solar Power") + return None + @property def battery_soc(self): """Property for Battery SoC.""" diff --git a/pyproject.toml b/pyproject.toml index 6992389..f01fc2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pycheckwatt" -version = "0.1.6" +version = "0.1.7" description = "Read data from CheckWatts EnergyInBalance WEB API" authors = ["Marcus Karlsson ", "Anders Yderborg ", "Daniel Nilsson "] license = "MIT License" diff --git a/setup.py b/setup.py index 619dbd8..beffbc6 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ MIN_PY_VERSION = "3.10" PACKAGES = find_packages() -VERSION = "0.1.0" +VERSION = "0.1.7" setup( name="pycheckwatt",