From fa96f88f95fd598b754ccee1316d8ce9b2dad599 Mon Sep 17 00:00:00 2001 From: geeks-r-us Date: Sun, 11 Feb 2024 18:41:09 +0000 Subject: [PATCH 1/7] updated manifest --- custom_components/maxstorage_ultimate/manifest.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom_components/maxstorage_ultimate/manifest.json b/custom_components/maxstorage_ultimate/manifest.json index c46c110..52ec8e3 100644 --- a/custom_components/maxstorage_ultimate/manifest.json +++ b/custom_components/maxstorage_ultimate/manifest.json @@ -6,5 +6,7 @@ "zeroconf": ["_maxstorage._tcp.local."], "config_flow": true, "integration_type": "hub", - "version": "0.0.1" + "version": "0.0.1", + "issue_tracker": "https://github.com/geeks-r-us/maxstorage_ultimate/issues", + "documentation": "https://github.com/geeks-r-us/maxstorage_ultimate" } \ No newline at end of file From 09da239d1bf571ca8596063c15db09552a47f839 Mon Sep 17 00:00:00 2001 From: geeks-r-us Date: Fri, 1 Mar 2024 20:21:18 +0000 Subject: [PATCH 2/7] added hassfest validation --- .github/workflows/hassfest.yml | 14 ++++++++++++++ .../.github => .github}/workflows/validate.yml | 0 2 files changed, 14 insertions(+) create mode 100644 .github/workflows/hassfest.yml rename {custom_components/maxstorage_ultimate/.github => .github}/workflows/validate.yml (100%) diff --git a/.github/workflows/hassfest.yml b/.github/workflows/hassfest.yml new file mode 100644 index 0000000..07d1dda --- /dev/null +++ b/.github/workflows/hassfest.yml @@ -0,0 +1,14 @@ +name: Validate with hassfest + +on: + push: + pull_request: + schedule: + - cron: "0 0 * * *" + +jobs: + validate: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v3" + - uses: home-assistant/actions/hassfest@master diff --git a/custom_components/maxstorage_ultimate/.github/workflows/validate.yml b/.github/workflows/validate.yml similarity index 100% rename from custom_components/maxstorage_ultimate/.github/workflows/validate.yml rename to .github/workflows/validate.yml From 20bb619a4b5cce02f03074e2b55375d25eabccdc Mon Sep 17 00:00:00 2001 From: geeks-r-us Date: Sun, 3 Mar 2024 11:17:18 +0000 Subject: [PATCH 3/7] added iot_class, fixed typo, moved hacs --- custom_components/maxstorage_ultimate/manifest.json | 1 + custom_components/maxstorage_ultimate/translations/en.json | 2 +- custom_components/maxstorage_ultimate/hacs.json => hacs.json | 0 3 files changed, 2 insertions(+), 1 deletion(-) rename custom_components/maxstorage_ultimate/hacs.json => hacs.json (100%) diff --git a/custom_components/maxstorage_ultimate/manifest.json b/custom_components/maxstorage_ultimate/manifest.json index 52ec8e3..2362bc6 100644 --- a/custom_components/maxstorage_ultimate/manifest.json +++ b/custom_components/maxstorage_ultimate/manifest.json @@ -3,6 +3,7 @@ "name": "Max.Storage Ultimate", "codeowners": ["@geeks-r-us"], "requirements": ["aiohttp", "zeroconf", "beautifulsoup4"], + "iot_class": "local_polling", "zeroconf": ["_maxstorage._tcp.local."], "config_flow": true, "integration_type": "hub", diff --git a/custom_components/maxstorage_ultimate/translations/en.json b/custom_components/maxstorage_ultimate/translations/en.json index 84a17f0..37c6fb5 100644 --- a/custom_components/maxstorage_ultimate/translations/en.json +++ b/custom_components/maxstorage_ultimate/translations/en.json @@ -33,7 +33,7 @@ "entity": { "sensor": { "batterySoC": { - "name": "Battery ScC" + "name": "Battery SoC" }, "batteryCapacity": { "name": "Battery Capacity" diff --git a/custom_components/maxstorage_ultimate/hacs.json b/hacs.json similarity index 100% rename from custom_components/maxstorage_ultimate/hacs.json rename to hacs.json From 753b35a667a571d38a35d9ef6027cc43a7451754 Mon Sep 17 00:00:00 2001 From: geeks-r-us Date: Mon, 4 Mar 2024 21:00:14 +0000 Subject: [PATCH 4/7] reorderd entries --- custom_components/maxstorage_ultimate/manifest.json | 11 ++++++----- hacs.json | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/custom_components/maxstorage_ultimate/manifest.json b/custom_components/maxstorage_ultimate/manifest.json index 2362bc6..1abbaa4 100644 --- a/custom_components/maxstorage_ultimate/manifest.json +++ b/custom_components/maxstorage_ultimate/manifest.json @@ -2,12 +2,13 @@ "domain": "maxstorage_ultimate", "name": "Max.Storage Ultimate", "codeowners": ["@geeks-r-us"], - "requirements": ["aiohttp", "zeroconf", "beautifulsoup4"], - "iot_class": "local_polling", - "zeroconf": ["_maxstorage._tcp.local."], "config_flow": true, + "documentation": "https://github.com/geeks-r-us/maxstorage_ultimate", + "requirements": ["aiohttp", "zeroconf", "beautifulsoup4"], "integration_type": "hub", - "version": "0.0.1", + "iot_class": "local_polling", "issue_tracker": "https://github.com/geeks-r-us/maxstorage_ultimate/issues", - "documentation": "https://github.com/geeks-r-us/maxstorage_ultimate" + "version": "0.0.1", + "zeroconf": ["_maxstorage._tcp.local."] + } \ No newline at end of file diff --git a/hacs.json b/hacs.json index e0312ab..6526e90 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Max.Storage Ultimate", - "render_readme": "true", + "render_readme": true, "country": "DE" } \ No newline at end of file From 2d4f3b6e98d1f10302524714c8591589d87d19dd Mon Sep 17 00:00:00 2001 From: geeks-r-us Date: Mon, 4 Mar 2024 21:12:34 +0000 Subject: [PATCH 5/7] updated manifest --- custom_components/maxstorage_ultimate/manifest.json | 1 - 1 file changed, 1 deletion(-) diff --git a/custom_components/maxstorage_ultimate/manifest.json b/custom_components/maxstorage_ultimate/manifest.json index 1abbaa4..5f8310e 100644 --- a/custom_components/maxstorage_ultimate/manifest.json +++ b/custom_components/maxstorage_ultimate/manifest.json @@ -10,5 +10,4 @@ "issue_tracker": "https://github.com/geeks-r-us/maxstorage_ultimate/issues", "version": "0.0.1", "zeroconf": ["_maxstorage._tcp.local."] - } \ No newline at end of file From c5010949fd547977e551207c9810ca95be1d8cae Mon Sep 17 00:00:00 2001 From: geeks-r-us Date: Mon, 4 Mar 2024 21:34:00 +0000 Subject: [PATCH 6/7] order --- custom_components/maxstorage_ultimate/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/maxstorage_ultimate/manifest.json b/custom_components/maxstorage_ultimate/manifest.json index 5f8310e..e7cbb8c 100644 --- a/custom_components/maxstorage_ultimate/manifest.json +++ b/custom_components/maxstorage_ultimate/manifest.json @@ -4,10 +4,10 @@ "codeowners": ["@geeks-r-us"], "config_flow": true, "documentation": "https://github.com/geeks-r-us/maxstorage_ultimate", - "requirements": ["aiohttp", "zeroconf", "beautifulsoup4"], "integration_type": "hub", "iot_class": "local_polling", "issue_tracker": "https://github.com/geeks-r-us/maxstorage_ultimate/issues", + "requirements": ["aiohttp", "zeroconf", "beautifulsoup4"], "version": "0.0.1", "zeroconf": ["_maxstorage._tcp.local."] } \ No newline at end of file From 2582011afc6d18082d0f305667723a099b0f2e2d Mon Sep 17 00:00:00 2001 From: geeks-r-us Date: Sun, 17 Mar 2024 10:21:42 +0000 Subject: [PATCH 7/7] obey naming conventions of hassfest --- custom_components/maxstorage_ultimate/sensor.py | 14 +++++++------- .../maxstorage_ultimate/translations/de.json | 14 +++++++------- .../maxstorage_ultimate/translations/en.json | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/custom_components/maxstorage_ultimate/sensor.py b/custom_components/maxstorage_ultimate/sensor.py index 046bcc0..dfac63c 100644 --- a/custom_components/maxstorage_ultimate/sensor.py +++ b/custom_components/maxstorage_ultimate/sensor.py @@ -93,7 +93,7 @@ def _handle_coordinator_update(self) -> None: SENSOR_TYPES: tuple[MaxStorageSensorDescription, ...] = ( MaxStorageSensorDescription( key="batterySoC", - translation_key="batterySoC", + translation_key="battery_soc", icon="mdi:battery", value_fn=lambda data: data["batterySoC"], native_unit_of_measurement=PERCENTAGE, @@ -102,7 +102,7 @@ def _handle_coordinator_update(self) -> None: ), MaxStorageSensorDescription( key="batteryCapacity", - translation_key="batteryCapacity", + translation_key="battery_capacity", icon="mdi:battery", value_fn=lambda data: data["batteryCapacity"], native_unit_of_measurement=UnitOfEnergy.WATT_HOUR, @@ -111,7 +111,7 @@ def _handle_coordinator_update(self) -> None: ), MaxStorageSensorDescription( key="batteryPower", - translation_key="batteryPower", + translation_key="battery_power", icon="mdi:battery", value_fn=lambda data: data["batteryPower"], native_unit_of_measurement=UnitOfPower.WATT, @@ -120,7 +120,7 @@ def _handle_coordinator_update(self) -> None: ), MaxStorageSensorDescription( key="gridPower", - translation_key="gridPower", + translation_key="grid_power", icon="mdi:transmission-tower", value_fn=lambda data: data["gridPower"], native_unit_of_measurement=UnitOfPower.WATT, @@ -129,7 +129,7 @@ def _handle_coordinator_update(self) -> None: ), MaxStorageSensorDescription( key="usagePower", - translation_key="usagePower", + translation_key="usage_power", icon="mdi:transmission-tower", value_fn=lambda data: data["usagePower"], native_unit_of_measurement=UnitOfPower.WATT, @@ -138,7 +138,7 @@ def _handle_coordinator_update(self) -> None: ), MaxStorageSensorDescription( key="plantPower", - translation_key="plantPower", + translation_key="plant_power", icon="mdi:solar-power", value_fn=lambda data: data["plantPower"], native_unit_of_measurement=UnitOfPower.WATT, @@ -146,7 +146,7 @@ def _handle_coordinator_update(self) -> None: device_class=SensorDeviceClass.POWER, ), MaxStorageSensorDescription( - key="storageDCPower", + key="storage_dc_power", translation_key="storageDCPower", icon="mdi:solar-power", value_fn=lambda data: data["storageDCPower"], diff --git a/custom_components/maxstorage_ultimate/translations/de.json b/custom_components/maxstorage_ultimate/translations/de.json index b9d8cf2..e28ab45 100644 --- a/custom_components/maxstorage_ultimate/translations/de.json +++ b/custom_components/maxstorage_ultimate/translations/de.json @@ -30,25 +30,25 @@ }, "entity": { "sensor": { - "batterySoC": { + "battery_soc": { "name": "Batterie SoC" }, - "batteryCapacity": { + "battery_capacity": { "name": "Batterie Kapazität" }, - "batteryPower": { + "battery_power": { "name": "Batterie Leistung" }, - "gridPower": { + "grid_power": { "name": "Netzleistung" }, - "usagePower": { + "usage_power": { "name": "Energieverbrauch" }, - "plantPower": { + "plant_power": { "name": "PV-Leistung" }, - "storageDCPower": { + "storage_dc_power": { "name": "Speicher DC Leistung" } } diff --git a/custom_components/maxstorage_ultimate/translations/en.json b/custom_components/maxstorage_ultimate/translations/en.json index 37c6fb5..f9aa6bd 100644 --- a/custom_components/maxstorage_ultimate/translations/en.json +++ b/custom_components/maxstorage_ultimate/translations/en.json @@ -32,25 +32,25 @@ }, "entity": { "sensor": { - "batterySoC": { + "battery_soc": { "name": "Battery SoC" }, - "batteryCapacity": { + "battery_capacity": { "name": "Battery Capacity" }, - "batteryPower": { + "battery_power": { "name": "Battery Power" }, - "gridPower": { + "grid_power": { "name": "Grid Power" }, - "usagePower": { + "usage_power": { "name": "Usage Power" }, - "plantPower": { + "plant_power": { "name": "Plant Power" }, - "storageDCPower": { + "storage_dc_power": { "name": "Storage DC Power" } }