Skip to content

Commit

Permalink
🚀 RELEASE: 2.11.49
Browse files Browse the repository at this point in the history
  • Loading branch information
unl0ck committed Jan 24, 2025
1 parent c953b44 commit 0dfb4f4
Show file tree
Hide file tree
Showing 19 changed files with 70 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .bumpversion-edge.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "2.11.48"
current_version = "2.11.49"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
Expand Down
6 changes: 6 additions & 0 deletions GridboxConnectorAddon-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<!-- https://developers.home-assistant.io/docs/add-ons/presentation#keeping-a-changelog -->

## 2.11.49

### 🔨 Fixed

- fixed battery live data sorry guys

## 2.11.48

### 🔨 Fixed
Expand Down
24 changes: 12 additions & 12 deletions GridboxConnectorAddon-dev/GridboxConnector/ha_viessmann_battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ def set_states(self, level, capacity, power, remaining_charge, charge=None, disc
self.battery_capacity.set_state(capacity)
self.battery_power.set_state(power)
self.battery_remaining_charge.set_state(remaining_charge)
# if charge is not None and self.battery_charge is not None:
# self.battery_sensor_charge = SensorInfo(name=f"Battery {self.name} Charge", device_class="energy", unique_id=f"gridbox_charge_{self.name}"+self.prefix, device=self.device_info, unit_of_measurement="Wh", state_class=self.state_class, value_template=None if self.state_class is None else "{{ value_json.state }}", last_reset_value_template=None if self.state_class is None else "{{ value_json.last_reset }}")
# self.battery_settings_charge = Settings(mqtt=self.mqtt_settings, entity=self.battery_sensor_charge)
# self.battery_charge = Sensor(self.battery_settings_charge)
# if charge is not None:
# self.battery_charge.set_state(charge)
if charge is not None and self.battery_charge is not None:
self.battery_sensor_charge = SensorInfo(name=f"Battery {self.name} Charge", device_class="energy", unique_id=f"gridbox_charge_{self.name}"+self.prefix, device=self.device_info, unit_of_measurement="Wh", state_class=self.state_class, value_template=None if self.state_class is None else "{{ value_json.state }}", last_reset_value_template=None if self.state_class is None else "{{ value_json.last_reset }}")
self.battery_settings_charge = Settings(mqtt=self.mqtt_settings, entity=self.battery_sensor_charge)
self.battery_charge = Sensor(self.battery_settings_charge)
if charge is not None:
self.battery_charge.set_state(charge)

# if discharge is not None and self.battery_discharge is not None:
# self.battery_sensor_discharge = SensorInfo(name=f"Battery {self.name} Discharge", device_class="energy", unique_id=f"gridbox_discharge_{self.name}"+self.prefix, device=self.device_info, unit_of_measurement="Wh", state_class=self.state_class, value_template=None if self.state_class is None else "{{ value_json.state }}", last_reset_value_template=None if self.state_class is None else "{{ value_json.last_reset }}")
# self.battery_settings_discharge = Settings(mqtt=self.mqtt_settings, entity=self.battery_sensor_discharge)
# self.battery_discharge = Sensor(self.battery_settings_discharge)
# if discharge is not None:
# self.battery_discharge.set_state(discharge)
if discharge is not None and self.battery_discharge is not None:
self.battery_sensor_discharge = SensorInfo(name=f"Battery {self.name} Discharge", device_class="energy", unique_id=f"gridbox_discharge_{self.name}"+self.prefix, device=self.device_info, unit_of_measurement="Wh", state_class=self.state_class, value_template=None if self.state_class is None else "{{ value_json.state }}", last_reset_value_template=None if self.state_class is None else "{{ value_json.last_reset }}")
self.battery_settings_discharge = Settings(mqtt=self.mqtt_settings, entity=self.battery_sensor_discharge)
self.battery_discharge = Sensor(self.battery_settings_discharge)
if discharge is not None:
self.battery_discharge.set_state(discharge)
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def update_sensors(self, measurement: dict, last_reset: str = None):
capacity = float(battery.get("capacity", "0"))
power = round(float(battery.get("power", "0")),2)
remaining_charge = round(float(battery.get("remainingCharge", "0")),2)
charge = round(float(battery.get("charge", None)),2)
discharge = round(float(battery.get("discharge", None)),2)
charge = round(float(battery.get("charge", "0")),2)
discharge = round(float(battery.get("discharge", "0")),2)
self.battery_sum.set_states(state_of_charge, capacity, power, remaining_charge, charge, discharge)

if "batteries" in measurement:
Expand Down
2 changes: 1 addition & 1 deletion GridboxConnectorAddon-dev/cloudSettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.11.48",
"version": "2.11.49",
"urls": {
"login": "https://gridx.eu.auth0.com/oauth/token",
"gateways": "https://api.gridx.de/gateways",
Expand Down
2 changes: 1 addition & 1 deletion GridboxConnectorAddon-dev/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
name: Viessmann Gridbox Connector (dev)
version: "2.11.48"
version: "2.11.49"
slug: "gridbox_connector_dev"
description: Development version of Viessmann Gridbox Connector
url: "https://github.com/unl0ck/homeassistant-addon-viessmann-gridbox/tree/main/GridboxConnectorAddon-dev"
Expand Down
2 changes: 1 addition & 1 deletion GridboxConnectorAddon-dev/rootfs/share/cloudSettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.11.48",
"version": "2.11.49",
"urls": {
"login": "https://gridx.eu.auth0.com/oauth/token",
"gateways": "https://api.gridx.de/gateways",
Expand Down
6 changes: 6 additions & 0 deletions GridboxConnectorAddon-edge/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<!-- https://developers.home-assistant.io/docs/add-ons/presentation#keeping-a-changelog -->

## 2.11.49

### 🔨 Fixed

- fixed battery live data sorry guys

## 2.11.48

### 🔨 Fixed
Expand Down
24 changes: 12 additions & 12 deletions GridboxConnectorAddon-edge/GridboxConnector/ha_viessmann_battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ def set_states(self, level, capacity, power, remaining_charge, charge=None, disc
self.battery_capacity.set_state(capacity)
self.battery_power.set_state(power)
self.battery_remaining_charge.set_state(remaining_charge)
# if charge is not None and self.battery_charge is not None:
# self.battery_sensor_charge = SensorInfo(name=f"Battery {self.name} Charge", device_class="energy", unique_id=f"gridbox_charge_{self.name}"+self.prefix, device=self.device_info, unit_of_measurement="Wh", state_class=self.state_class, value_template=None if self.state_class is None else "{{ value_json.state }}", last_reset_value_template=None if self.state_class is None else "{{ value_json.last_reset }}")
# self.battery_settings_charge = Settings(mqtt=self.mqtt_settings, entity=self.battery_sensor_charge)
# self.battery_charge = Sensor(self.battery_settings_charge)
# if charge is not None:
# self.battery_charge.set_state(charge)
if charge is not None and self.battery_charge is not None:
self.battery_sensor_charge = SensorInfo(name=f"Battery {self.name} Charge", device_class="energy", unique_id=f"gridbox_charge_{self.name}"+self.prefix, device=self.device_info, unit_of_measurement="Wh", state_class=self.state_class, value_template=None if self.state_class is None else "{{ value_json.state }}", last_reset_value_template=None if self.state_class is None else "{{ value_json.last_reset }}")
self.battery_settings_charge = Settings(mqtt=self.mqtt_settings, entity=self.battery_sensor_charge)
self.battery_charge = Sensor(self.battery_settings_charge)
if charge is not None:
self.battery_charge.set_state(charge)

# if discharge is not None and self.battery_discharge is not None:
# self.battery_sensor_discharge = SensorInfo(name=f"Battery {self.name} Discharge", device_class="energy", unique_id=f"gridbox_discharge_{self.name}"+self.prefix, device=self.device_info, unit_of_measurement="Wh", state_class=self.state_class, value_template=None if self.state_class is None else "{{ value_json.state }}", last_reset_value_template=None if self.state_class is None else "{{ value_json.last_reset }}")
# self.battery_settings_discharge = Settings(mqtt=self.mqtt_settings, entity=self.battery_sensor_discharge)
# self.battery_discharge = Sensor(self.battery_settings_discharge)
# if discharge is not None:
# self.battery_discharge.set_state(discharge)
if discharge is not None and self.battery_discharge is not None:
self.battery_sensor_discharge = SensorInfo(name=f"Battery {self.name} Discharge", device_class="energy", unique_id=f"gridbox_discharge_{self.name}"+self.prefix, device=self.device_info, unit_of_measurement="Wh", state_class=self.state_class, value_template=None if self.state_class is None else "{{ value_json.state }}", last_reset_value_template=None if self.state_class is None else "{{ value_json.last_reset }}")
self.battery_settings_discharge = Settings(mqtt=self.mqtt_settings, entity=self.battery_sensor_discharge)
self.battery_discharge = Sensor(self.battery_settings_discharge)
if discharge is not None:
self.battery_discharge.set_state(discharge)
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def update_sensors(self, measurement: dict, last_reset: str = None):
capacity = float(battery.get("capacity", "0"))
power = round(float(battery.get("power", "0")),2)
remaining_charge = round(float(battery.get("remainingCharge", "0")),2)
charge = round(float(battery.get("charge", None)),2)
discharge = round(float(battery.get("discharge", None)),2)
charge = round(float(battery.get("charge", "0")),2)
discharge = round(float(battery.get("discharge", "0")),2)
self.battery_sum.set_states(state_of_charge, capacity, power, remaining_charge, charge, discharge)

if "batteries" in measurement:
Expand Down
2 changes: 1 addition & 1 deletion GridboxConnectorAddon-edge/cloudSettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.11.48",
"version": "2.11.49",
"urls": {
"login": "https://gridx.eu.auth0.com/oauth/token",
"gateways": "https://api.gridx.de/gateways",
Expand Down
2 changes: 1 addition & 1 deletion GridboxConnectorAddon-edge/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
---
name: Viessmann Gridbox Connector (edge)
version: "2.11.48"
version: "2.11.49"
slug: "gridbox_connector_edge"
description: "Viessmann Gridbox Connector (edge)"
url: "https://github.com/unl0ck/homeassistant-addon-viessmann-gridbox/tree/main/GridboxConnectorAddon-edge"
Expand Down
2 changes: 1 addition & 1 deletion GridboxConnectorAddon-edge/rootfs/share/cloudSettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.11.48",
"version": "2.11.49",
"urls": {
"login": "https://gridx.eu.auth0.com/oauth/token",
"gateways": "https://api.gridx.de/gateways",
Expand Down
6 changes: 6 additions & 0 deletions GridboxConnectorAddon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<!-- https://developers.home-assistant.io/docs/add-ons/presentation#keeping-a-changelog -->

## 2.11.49

### 🔨 Fixed

- fixed battery live data sorry guys

## 2.11.48

### 🔨 Fixed
Expand Down
24 changes: 12 additions & 12 deletions GridboxConnectorAddon/GridboxConnector/ha_viessmann_battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ def set_states(self, level, capacity, power, remaining_charge, charge=None, disc
self.battery_capacity.set_state(capacity)
self.battery_power.set_state(power)
self.battery_remaining_charge.set_state(remaining_charge)
# if charge is not None and self.battery_charge is not None:
# self.battery_sensor_charge = SensorInfo(name=f"Battery {self.name} Charge", device_class="energy", unique_id=f"gridbox_charge_{self.name}"+self.prefix, device=self.device_info, unit_of_measurement="Wh", state_class=self.state_class, value_template=None if self.state_class is None else "{{ value_json.state }}", last_reset_value_template=None if self.state_class is None else "{{ value_json.last_reset }}")
# self.battery_settings_charge = Settings(mqtt=self.mqtt_settings, entity=self.battery_sensor_charge)
# self.battery_charge = Sensor(self.battery_settings_charge)
# if charge is not None:
# self.battery_charge.set_state(charge)
if charge is not None and self.battery_charge is not None:
self.battery_sensor_charge = SensorInfo(name=f"Battery {self.name} Charge", device_class="energy", unique_id=f"gridbox_charge_{self.name}"+self.prefix, device=self.device_info, unit_of_measurement="Wh", state_class=self.state_class, value_template=None if self.state_class is None else "{{ value_json.state }}", last_reset_value_template=None if self.state_class is None else "{{ value_json.last_reset }}")
self.battery_settings_charge = Settings(mqtt=self.mqtt_settings, entity=self.battery_sensor_charge)
self.battery_charge = Sensor(self.battery_settings_charge)
if charge is not None:
self.battery_charge.set_state(charge)

# if discharge is not None and self.battery_discharge is not None:
# self.battery_sensor_discharge = SensorInfo(name=f"Battery {self.name} Discharge", device_class="energy", unique_id=f"gridbox_discharge_{self.name}"+self.prefix, device=self.device_info, unit_of_measurement="Wh", state_class=self.state_class, value_template=None if self.state_class is None else "{{ value_json.state }}", last_reset_value_template=None if self.state_class is None else "{{ value_json.last_reset }}")
# self.battery_settings_discharge = Settings(mqtt=self.mqtt_settings, entity=self.battery_sensor_discharge)
# self.battery_discharge = Sensor(self.battery_settings_discharge)
# if discharge is not None:
# self.battery_discharge.set_state(discharge)
if discharge is not None and self.battery_discharge is not None:
self.battery_sensor_discharge = SensorInfo(name=f"Battery {self.name} Discharge", device_class="energy", unique_id=f"gridbox_discharge_{self.name}"+self.prefix, device=self.device_info, unit_of_measurement="Wh", state_class=self.state_class, value_template=None if self.state_class is None else "{{ value_json.state }}", last_reset_value_template=None if self.state_class is None else "{{ value_json.last_reset }}")
self.battery_settings_discharge = Settings(mqtt=self.mqtt_settings, entity=self.battery_sensor_discharge)
self.battery_discharge = Sensor(self.battery_settings_discharge)
if discharge is not None:
self.battery_discharge.set_state(discharge)
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def update_sensors(self, measurement: dict, last_reset: str = None):
capacity = float(battery.get("capacity", "0"))
power = round(float(battery.get("power", "0")),2)
remaining_charge = round(float(battery.get("remainingCharge", "0")),2)
charge = round(float(battery.get("charge", None)),2)
discharge = round(float(battery.get("discharge", None)),2)
charge = round(float(battery.get("charge", "0")),2)
discharge = round(float(battery.get("discharge", "0")),2)
self.battery_sum.set_states(state_of_charge, capacity, power, remaining_charge, charge, discharge)

if "batteries" in measurement:
Expand Down
2 changes: 1 addition & 1 deletion GridboxConnectorAddon/cloudSettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.11.48",
"version": "2.11.49",
"urls": {
"login": "https://gridx.eu.auth0.com/oauth/token",
"gateways": "https://api.gridx.de/gateways",
Expand Down
2 changes: 1 addition & 1 deletion GridboxConnectorAddon/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
name: Viessmann Gridbox Connector
version: "2.11.48"
version: "2.11.49"
slug: "gridbox_connector"
description: Fetch your live data from your Viessmann Gridbox
url: "https://github.com/unl0ck/homeassistant-addon-viessmann-gridbox/tree/main/GridboxConnectorAddon"
Expand Down
2 changes: 1 addition & 1 deletion GridboxConnectorAddon/rootfs/share/cloudSettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.11.48",
"version": "2.11.49",
"urls": {
"login": "https://gridx.eu.auth0.com/oauth/token",
"gateways": "https://api.gridx.de/gateways",
Expand Down

0 comments on commit 0dfb4f4

Please sign in to comment.