Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
feat!: изменены имена сущностей
Browse files Browse the repository at this point in the history
  • Loading branch information
Александр Тумайкин authored and Александр Тумайкин committed Jun 25, 2021
1 parent 9b1ec1e commit fcd9f8e
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion custom_components/electrolux_remote/base_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(
super().__init__(coordinator)

self._uid = uid
self._name = f"{name} {uid}"
self._name = name
self._icon_on = icon_on
self._icon_off = icon_off
self._device = device
Expand Down
2 changes: 1 addition & 1 deletion custom_components/electrolux_remote/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
NAME = "{{ Electrolux remote }}"
DOMAIN = "electrolux_remote"
DOMAIN_DATA = f"{DOMAIN}_data"
VERSION = "1.1.0"
VERSION = "2.0.0"
ISSUE_URL = "https://github.com/Ailme/home_assistant_electrolux_remote/issues"

CONF_APPCODE = "appcode"
Expand Down
4 changes: 2 additions & 2 deletions custom_components/electrolux_remote/devices/centurio.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Self Clean",
name=f"{DEFAULT_NAME} {data['uid']} Self Clean",
icon_on="mdi:ghost",
icon_off="mdi:ghost-off",
device=Centurio(),
Expand All @@ -257,7 +257,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Timer",
name=f"{DEFAULT_NAME} {data['uid']} Timer",
icon_on="mdi:timer",
icon_off="mdi:timer-off",
device=Centurio(),
Expand Down
6 changes: 3 additions & 3 deletions custom_components/electrolux_remote/devices/centurio2.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Bacteria stop system",
name=f"{DEFAULT_NAME} {data['uid']} Bacteria stop system",
icon_on="mdi:ghost",
icon_off="mdi:ghost-off",
device=Centurio2(),
Expand All @@ -262,14 +262,14 @@ def get_switches(data: dict, coordinator: Coordinator):
Timer(
uid=data["uid"],
coordinator=coordinator,
name=f"Timer",
name=f"{DEFAULT_NAME} {data['uid']} Timer",
device=Centurio2(),
),

BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Economy pause",
name=f"{DEFAULT_NAME} {data['uid']} Economy pause",
icon_on="mdi:pause",
icon_off="mdi:play",
device=Centurio2(),
Expand Down
6 changes: 3 additions & 3 deletions custom_components/electrolux_remote/devices/convector.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Led",
name=f"{DEFAULT_NAME} {data['uid']} Led",
icon_on="mdi:led-on",
icon_off="mdi:led-off",
device=Convector(),
Expand All @@ -195,7 +195,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Lock",
name=f"{DEFAULT_NAME} {data['uid']} Lock",
icon_on="mdi:lock",
icon_off="mdi:lock-open",
device=Convector(),
Expand All @@ -208,7 +208,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Timer",
name=f"{DEFAULT_NAME} {data['uid']} Timer",
icon_on="mdi:timer",
icon_off="mdi:timer-off",
device=Convector(),
Expand Down
14 changes: 7 additions & 7 deletions custom_components/electrolux_remote/devices/convector2.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Led off auto",
name=f"{DEFAULT_NAME} {data['uid']} Led off auto",
icon_on="mdi:brightness-auto",
icon_off="mdi:brightness-auto",
device=Convector2(),
Expand All @@ -501,7 +501,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Lcd",
name=f"{DEFAULT_NAME} {data['uid']} Lcd",
icon_on="mdi:led-on",
icon_off="mdi:led-off",
device=Convector2(),
Expand All @@ -514,7 +514,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Brightness",
name=f"{DEFAULT_NAME} {data['uid']} Brightness",
icon_on="mdi:brightness-5",
icon_off="mdi:brightness-6",
device=Convector2(),
Expand All @@ -527,7 +527,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Window Open",
name=f"{DEFAULT_NAME} {data['uid']} Window Open",
icon_on="mdi:window-open",
icon_off="mdi:window-closed",
device=Convector2(),
Expand All @@ -540,7 +540,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Mute",
name=f"{DEFAULT_NAME} {data['uid']} Mute",
icon_on="mdi:volume-off",
icon_off="mdi:volume-high",
device=Convector2(),
Expand All @@ -553,7 +553,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Lock",
name=f"{DEFAULT_NAME} {data['uid']} Lock",
icon_on="mdi:lock",
icon_off="mdi:lock-open",
device=Convector2(),
Expand All @@ -566,7 +566,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Timer",
name=f"{DEFAULT_NAME} {data['uid']} Timer",
icon_on="mdi:timer",
icon_off="mdi:timer-off",
device=Convector2(),
Expand Down
2 changes: 1 addition & 1 deletion custom_components/electrolux_remote/devices/smart.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def get_switches(data: dict, coordinator: Coordinator):
BaseSwitch(
uid=data["uid"],
coordinator=coordinator,
name=f"Self Clean",
name=f"{DEFAULT_NAME} {data['uid']} Self Clean",
icon_on="mdi:ghost",
icon_off="mdi:ghost-off",
device=Smart(),
Expand Down
2 changes: 1 addition & 1 deletion custom_components/electrolux_remote/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"@Ailme"
],
"iot_class": "cloud_polling",
"version": "1.1.0"
"version": "2.0.0"
}
3 changes: 2 additions & 1 deletion info.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
This is **only** intended for development!

{%- elif (version_installed.replace("v", "").split(".")[0] | int) < 1 %}
## Version 1.1.0
## Version 2.0.0

### Features
- изменены имена сущностей
- повторный опрос статуса устройств, если произошел сбой при обращении к серверу

## Version 1.0.1
Expand Down

0 comments on commit fcd9f8e

Please sign in to comment.