1
0
mirror of https://github.com/elisspace/core.git synced 2026-08-29 15:43:55 +00:00

add external battery state

This commit is contained in:
farmio
2023-06-07 14:08:29 +02:00
parent 087e40f0f3
commit 8d899660fa
2 changed files with 4 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ class MeterLocationCodeOption(StrEnum):
FEED_IN = "feed_in"
CONSUMPTION_PATH = "consumption_path"
GENERATOR = "external_generator"
EXT_BATTERY = "external_battery"
SUBLOAD = "subload"
@@ -90,6 +91,8 @@ def get_meter_location_description(code: StateType) -> MeterLocationCodeOption |
return MeterLocationCodeOption.CONSUMPTION_PATH
case 3:
return MeterLocationCodeOption.GENERATOR
case 4:
return MeterLocationCodeOption.EXT_BATTERY
case _ as _code if 256 <= _code <= 511:
return MeterLocationCodeOption.SUBLOAD
return None

View File

@@ -135,6 +135,7 @@
"feed_in": "Grid interconnection point",
"consumption_path": "Consumption path",
"external_generator": "External generator",
"external_battery": "External battery",
"subload": "Subload"
}
},