Skip to content

Commit

Permalink
Add grid export limit switch
Browse files Browse the repository at this point in the history
  • Loading branch information
mletenay committed Apr 15, 2024
1 parent d2d8842 commit 49007d2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
7 changes: 7 additions & 0 deletions custom_components/goodwe/icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
}
},
"switch": {
"grid_export_limit_switch": {
"default": "mdi:transmission-tower-import",
"state": {
"on": "mdi:transmission-tower",
"off": "mdi:transmission-tower-import"
}
},
"load_control": {
"default": "mdi:electric-switch",
"state": {
Expand Down
7 changes: 7 additions & 0 deletions custom_components/goodwe/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ class GoodweSwitchEntityDescription(SwitchEntityDescription):
device_class=SwitchDeviceClass.OUTLET,
setting="load_control_switch",
),
GoodweSwitchEntityDescription(
key="grid_export_limit_switch",
translation_key="grid_export_limit_switch",
entity_category=EntityCategory.CONFIG,
device_class=SwitchDeviceClass.SWITCH,
setting="grid_export",
),
)


Expand Down
3 changes: 3 additions & 0 deletions custom_components/goodwe/translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
}
},
"switch": {
"grid_export_limit_switch": {
"name": "Řízení dodávky do sítě"
},
"load_control": {
"name": "Řízení zátěže"
}
Expand Down
5 changes: 4 additions & 1 deletion custom_components/goodwe/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"error": {
"connection_error": "Failed to connect"
},
"flow_title": "GoodWe",
"flow_title": "GoodWe",
"step": {
"user": {
"data": {
Expand Down Expand Up @@ -63,6 +63,9 @@
}
},
"switch": {
"grid_export_limit_switch": {
"name": "Grid export limit switch"
},
"load_control": {
"name": "Load control"
}
Expand Down

0 comments on commit 49007d2

Please sign in to comment.