diff --git a/.bumpversion-edge.toml b/.bumpversion-edge.toml index 7d8a992..13289ab 100644 --- a/.bumpversion-edge.toml +++ b/.bumpversion-edge.toml @@ -1,5 +1,5 @@ [tool.bumpversion] -current_version = "2.11.17" +current_version = "2.11.18" parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)" serialize = ["{major}.{minor}.{patch}"] search = "{current_version}" diff --git a/GridboxConnectorAddon-edge/CHANGELOG.md b/GridboxConnectorAddon-edge/CHANGELOG.md index f0ea748..73f50d8 100644 --- a/GridboxConnectorAddon-edge/CHANGELOG.md +++ b/GridboxConnectorAddon-edge/CHANGELOG.md @@ -1,5 +1,11 @@ +## 2.11.18 + +### 🔨 Fixed + +- historical data now support Wh + ## 2.11.17 ### 🔨 Fixed diff --git a/GridboxConnectorAddon-edge/GridboxConnector/__main__.py b/GridboxConnectorAddon-edge/GridboxConnector/__main__.py index 224989c..7afdab1 100644 --- a/GridboxConnectorAddon-edge/GridboxConnector/__main__.py +++ b/GridboxConnectorAddon-edge/GridboxConnector/__main__.py @@ -130,7 +130,7 @@ def run_addon(): viessmann_gridbox_device = HAViessmannGridboxConnector(mqtt_settings=mqtt_settings, logger=logger) - viessmann_gridbox_historical_device = HAViessmannGridboxConnector(mqtt_settings=mqtt_settings, device_name="Viessmann Gridbox Historical",device_identifiers="viessmann_gridbox_historical",logger=logger, prefix="historical") + viessmann_gridbox_historical_device = HAViessmannGridboxConnector(mqtt_settings=mqtt_settings, device_name="Viessmann Gridbox Historical",device_identifiers="viessmann_gridbox_historical",logger=logger, prefix="historical", unit_of_power="Wh") gridboxConnector = GridboxConnector(gridbox_config) diff --git a/GridboxConnectorAddon-edge/GridboxConnector/ha_viessmann_gridbox_connector.py b/GridboxConnectorAddon-edge/GridboxConnector/ha_viessmann_gridbox_connector.py index d76a570..73e7075 100644 --- a/GridboxConnectorAddon-edge/GridboxConnector/ha_viessmann_gridbox_connector.py +++ b/GridboxConnectorAddon-edge/GridboxConnector/ha_viessmann_gridbox_connector.py @@ -27,7 +27,7 @@ class HAViessmannGridboxConnector: heater_sensor: HAViessmannHeater logger: logging.Logger - def __init__(self, mqtt_settings, device_name="Viessmann Gridbox", device_identifiers="viessmann_gridbox", device_manufacturer="Viessmann", device_model="Vitocharge 2.0",prefix="", logger=logging.getLogger(__name__)): + def __init__(self, mqtt_settings, device_name="Viessmann Gridbox", device_identifiers="viessmann_gridbox", device_manufacturer="Viessmann", device_model="Vitocharge 2.0", logger=logging.getLogger(__name__), unit_of_power="W"): self.battery_sensor_dict = {} self.ev_sensor_dict = {} self.logger = logger @@ -35,43 +35,43 @@ def __init__(self, mqtt_settings, device_name="Viessmann Gridbox", device_identi self.device_info = DeviceInfo( name=device_name, identifiers=device_identifiers, manufacturer=device_manufacturer, model=device_model) self.logger.info(f"Device Info: {self.device_info}") - production_sensor_info = SensorInfo(name="Production", device_class="power", unique_id="gridbox_production"+prefix, device=self.device_info, unit_of_measurement="W") + production_sensor_info = SensorInfo(name="Production", device_class="power", unique_id="gridbox_production", device=self.device_info, unit_of_measurement=unit_of_power) production_settings = Settings(mqtt=mqtt_settings, entity=production_sensor_info) - grid_sensor_info = SensorInfo(name="Grid", device_class="power", unique_id="gridbox_grid"+prefix, device=self.device_info, unit_of_measurement="W") + grid_sensor_info = SensorInfo(name="Grid", device_class="power", unique_id="gridbox_grid", device=self.device_info, unit_of_measurement=unit_of_power) grid_settings = Settings(mqtt=mqtt_settings, entity=grid_sensor_info) - photovoltaic_sensor_info = SensorInfo(name="Photovoltaic", device_class="power", unique_id="gridbox_photovoltaic"+prefix, device=self.device_info, unit_of_measurement="W") + photovoltaic_sensor_info = SensorInfo(name="Photovoltaic", device_class="power", unique_id="gridbox_photovoltaic", device=self.device_info, unit_of_measurement=unit_of_power) photovoltaic_settings = Settings(mqtt=mqtt_settings, entity=photovoltaic_sensor_info) # consumption - consumption_household_sensor_info = SensorInfo(name="Consumption", device_class="power", unique_id="gridbox_consumption_household"+prefix, device=self.device_info, unit_of_measurement="W") + consumption_household_sensor_info = SensorInfo(name="Consumption", device_class="power", unique_id="gridbox_consumption_household", device=self.device_info, unit_of_measurement=unit_of_power) consumption_household_settings = Settings(mqtt=mqtt_settings, entity=consumption_household_sensor_info) - total_consumption_household_sensor_info = SensorInfo(name="Total Consumption", device_class="power", unique_id="total_consumption_household"+prefix, device=self.device_info, unit_of_measurement="W") + total_consumption_household_sensor_info = SensorInfo(name="Total Consumption", device_class="power", unique_id="total_consumption_household", device=self.device_info, unit_of_measurement=unit_of_power) total_consumption_household_settings = Settings(mqtt=mqtt_settings, entity=total_consumption_household_sensor_info) # Direct Consumption - direct_consumption_household_sensor_info = SensorInfo(name="DirectConsumptionHousehold", device_class="power", unique_id="gridbox_direct_consumption_household"+prefix, device=self.device_info, unit_of_measurement="W") + direct_consumption_household_sensor_info = SensorInfo(name="DirectConsumptionHousehold", device_class="power", unique_id="gridbox_direct_consumption_household", device=self.device_info, unit_of_measurement=unit_of_power) direct_consumption_household_settings = Settings(mqtt=mqtt_settings, entity=direct_consumption_household_sensor_info) - direct_consumption_heatpump_sensor_info = SensorInfo(name="DirectConsumptionHeatPump", device_class="power", unique_id="gridbox_direct_consumption_heatpump"+prefix, device=self.device_info, unit_of_measurement="W") + direct_consumption_heatpump_sensor_info = SensorInfo(name="DirectConsumptionHeatPump", device_class="power", unique_id="gridbox_direct_consumption_heatpump", device=self.device_info, unit_of_measurement=unit_of_power) direct_consumption_heatpump_settings = Settings(mqtt=mqtt_settings, entity=direct_consumption_heatpump_sensor_info) - direct_consumption_ev_sensor_info = SensorInfo(name="DirectConsumptionEV", device_class="power", unique_id="gridbox_direct_consumption_ev"+prefix, device=self.device_info, unit_of_measurement="W") + direct_consumption_ev_sensor_info = SensorInfo(name="DirectConsumptionEV", device_class="power", unique_id="gridbox_direct_consumption_ev", device=self.device_info, unit_of_measurement=unit_of_power) direct_consumption_ev_settings = Settings(mqtt=mqtt_settings, entity=direct_consumption_ev_sensor_info) - direct_consumption_rate_sensor_info = SensorInfo(name="DirectConsumptionRate", device_class="power_factor", unique_id="gridbox_direct_consumption_rate"+prefix, device=self.device_info, unit_of_measurement="%") + direct_consumption_rate_sensor_info = SensorInfo(name="DirectConsumptionRate", device_class="power_factor", unique_id="gridbox_direct_consumption_rate", device=self.device_info, unit_of_measurement="%") direct_consumption_rate_settings = Settings(mqtt=mqtt_settings, entity=direct_consumption_rate_sensor_info) # Self Consumption - self_supply_sensor_info = SensorInfo(name="SelfSupply", device_class="power",unique_id="gridbox_self_supply"+prefix, device=self.device_info, unit_of_measurement="W") + self_supply_sensor_info = SensorInfo(name="SelfSupply", device_class="power",unique_id="gridbox_self_supply", device=self.device_info, unit_of_measurement=unit_of_power) self_supply_settings = Settings(mqtt=mqtt_settings, entity=self_supply_sensor_info) - self_consumption_rate_sensor_info = SensorInfo(name="SelfConsumptionRate", device_class="power_factor", unique_id="gridbox_self_consumption_rate"+prefix, device=self.device_info, unit_of_measurement="%") + self_consumption_rate_sensor_info = SensorInfo(name="SelfConsumptionRate", device_class="power_factor", unique_id="gridbox_self_consumption_rate", device=self.device_info, unit_of_measurement="%") self_consumption_rate_settings = Settings(mqtt=mqtt_settings, entity=self_consumption_rate_sensor_info) - self_sufficiency_rate_sensor_info = SensorInfo(name="SelfSufficiencyRate", device_class="power_factor", unique_id="gridbox_self_sufficiency_rate"+prefix, device=self.device_info, unit_of_measurement="%") + self_sufficiency_rate_sensor_info = SensorInfo(name="SelfSufficiencyRate", device_class="power_factor", unique_id="gridbox_self_sufficiency_rate", device=self.device_info, unit_of_measurement="%") self_sufficiency_rate_settings = Settings(mqtt=mqtt_settings, entity=self_sufficiency_rate_sensor_info) # Instantiate the sensors @@ -81,13 +81,13 @@ def __init__(self, mqtt_settings, device_name="Viessmann Gridbox", device_identi self.photovoltaic_sensor = Sensor(photovoltaic_settings) # Battery sum - self.battery_sum = HAViessmannBattery(mqtt_settings, self.device_info, "sum", ""+prefix) + self.battery_sum = HAViessmannBattery(mqtt_settings, self.device_info, "sum", "") # Heater - self.heater_sensor = HAViessmannHeater(mqtt_settings, self.device_info, "", ""+prefix) + self.heater_sensor = HAViessmannHeater(mqtt_settings, self.device_info, "", "") # EV - self.ev_sum = HAViessmannEVChargingStation(mqtt_settings, self.device_info, "sum", ""+prefix) + self.ev_sum = HAViessmannEVChargingStation(mqtt_settings, self.device_info, "sum", "") # Consumption self.consumption_household_sensor = Sensor(consumption_household_settings) diff --git a/GridboxConnectorAddon-edge/cloudSettings.json b/GridboxConnectorAddon-edge/cloudSettings.json index 2b4935b..80d535b 100644 --- a/GridboxConnectorAddon-edge/cloudSettings.json +++ b/GridboxConnectorAddon-edge/cloudSettings.json @@ -1,5 +1,5 @@ { - "version": "2.11.17", + "version": "2.11.18", "urls": { "login": "https://gridx.eu.auth0.com/oauth/token", "gateways": "https://api.gridx.de/gateways", diff --git a/GridboxConnectorAddon-edge/config.yaml b/GridboxConnectorAddon-edge/config.yaml index bfe038c..dcd80d2 100644 --- a/GridboxConnectorAddon-edge/config.yaml +++ b/GridboxConnectorAddon-edge/config.yaml @@ -1,7 +1,7 @@ # https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config --- name: Viessmann Gridbox Connector (edge) -version: "2.11.17" +version: "2.11.18" slug: "gridbox_connector_edge" description: "Viessmann Gridbox Connector (edge)" url: "https://github.com/unl0ck/homeassistant-addon-viessmann-gridbox/tree/main/GridboxConnectorAddon-edge" diff --git a/GridboxConnectorAddon-edge/rootfs/share/cloudSettings.json b/GridboxConnectorAddon-edge/rootfs/share/cloudSettings.json index 2b4935b..80d535b 100644 --- a/GridboxConnectorAddon-edge/rootfs/share/cloudSettings.json +++ b/GridboxConnectorAddon-edge/rootfs/share/cloudSettings.json @@ -1,5 +1,5 @@ { - "version": "2.11.17", + "version": "2.11.18", "urls": { "login": "https://gridx.eu.auth0.com/oauth/token", "gateways": "https://api.gridx.de/gateways",