Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.0.1 #5

Merged
merged 7 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/hassfest.yml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 6 additions & 3 deletions custom_components/maxstorage_ultimate/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
"domain": "maxstorage_ultimate",
"name": "Max.Storage Ultimate",
"codeowners": ["@geeks-r-us"],
"requirements": ["aiohttp", "zeroconf", "beautifulsoup4"],
"zeroconf": ["_maxstorage._tcp.local."],
"config_flow": true,
"documentation": "https://github.com/geeks-r-us/maxstorage_ultimate",
"integration_type": "hub",
"version": "0.0.1"
"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."]
}
14 changes: 7 additions & 7 deletions custom_components/maxstorage_ultimate/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -138,15 +138,15 @@ 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,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.POWER,
),
MaxStorageSensorDescription(
key="storageDCPower",
key="storage_dc_power",
translation_key="storageDCPower",
icon="mdi:solar-power",
value_fn=lambda data: data["storageDCPower"],
Expand Down
14 changes: 7 additions & 7 deletions custom_components/maxstorage_ultimate/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Expand Down
16 changes: 8 additions & 8 deletions custom_components/maxstorage_ultimate/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,25 @@
},
"entity": {
"sensor": {
"batterySoC": {
"name": "Battery ScC"
"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"
}
}
Expand Down
2 changes: 1 addition & 1 deletion ..._components/maxstorage_ultimate/hacs.json → hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Max.Storage Ultimate",
"render_readme": "true",
"render_readme": true,
"country": "DE"
}
Loading