Skip to content

Commit

Permalink
Fix issue with serial number in names twice
Browse files Browse the repository at this point in the history
  • Loading branch information
springfall2008 authored May 3, 2024
1 parent 0644d70 commit 572367e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion custom_components/ge_cloud/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

_LOGGER = logging.getLogger(__name__)
TIMEOUT = 240
RETRIES = 10
RETRIES = 5
MAX_THREADS = 2


Expand Down
2 changes: 1 addition & 1 deletion custom_components/ge_cloud/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import homeassistant.helpers.config_validation as cv

DOMAIN = "ge_cloud"
INTEGRATION_VERSION = "1.1.4"
INTEGRATION_VERSION = "1.1.5"
CONFIG_VERSION = 1

CONFIG_KIND = "kind"
Expand Down
2 changes: 1 addition & 1 deletion custom_components/ge_cloud/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"iot_class": "cloud_polling",
"requirements": ["pytz"],
"ssdp": [],
"version": "1.1.4",
"version": "1.1.5",
"zeroconf": []
}
4 changes: 2 additions & 2 deletions custom_components/ge_cloud/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ def __init__(self, coordinator, description, serial) -> None:
super().__init__(coordinator)
self.entity_description = description

self._attr_name = f"GE Inverter {serial} {description.name}"
self._attr_name = f"{description.name}"
self._attr_key = f"{description.key}"
self.device_name = f"GE Inverter {serial}"
self._attr_key = f"ge_inverter_{serial}_{description.key}"
self.device_key = f"ge_inverter_{serial}"
self._attr_device_class = description.device_class
self._attr_unique_id = (
Expand Down
4 changes: 2 additions & 2 deletions custom_components/ge_cloud/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def __init__(
super().__init__(coordinator)
self.entity_description = description

self._attr_name = f"GE Inverter {serial} {description.name}"
self._attr_key = f"ge_inverter_{serial}_{description.key}"
self._attr_name = f"{description.name}"
self._attr_key = f"{description.key}"
self.device_name = f"GE Inverter {serial}"
self.device_key = f"ge_inverter_{serial}"
self._attr_device_class = description.device_class
Expand Down
8 changes: 4 additions & 4 deletions custom_components/ge_cloud/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,13 @@ def __init__(self, coordinator, description, serial) -> None:
device_name = coordinator.device_name

if coordinator.type == "smart_device":
self._attr_key = f"ge_smart_{serial}_{description.key}"
self._attr_name = f"GE Smart {device_name} {description.name}"
self._attr_key = f"{description.key}"
self._attr_name = f"{description.name}"
self.device_name = f"GE Smart {device_name}"
self.device_key = f"ge_smart_{serial}"
else:
self._attr_key = f"ge_inverter_{serial}_{description.key}"
self._attr_name = f"GE Inverter {device_name} {description.name}"
self._attr_key = f"{description.key}"
self._attr_name = f"{description.name}"
self.device_name = f"GE Inverter {device_name}"
self.device_key = f"ge_inverter_{serial}"
self._attr_state_class = description.state_class
Expand Down
4 changes: 2 additions & 2 deletions custom_components/ge_cloud/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ def __init__(self, coordinator, description, serial) -> None:
super().__init__(coordinator)
self.entity_description = description

self._attr_name = f"GE Inverter {serial} {description.name}"
self._attr_name = f"{description.name}"
self.device_name = f"GE Inverter {serial}"
self._attr_key = f"ge_inverter_{serial}_{description.key}"
self._attr_key = f"{description.key}"
self.device_key = f"ge_inverter_{serial}"
self._attr_device_class = description.device_class
self._attr_unique_id = (
Expand Down

0 comments on commit 572367e

Please sign in to comment.