diff --git a/custom_components/electrolux_remote/base_switch.py b/custom_components/electrolux_remote/base_switch.py index ea5edf9..4041f86 100644 --- a/custom_components/electrolux_remote/base_switch.py +++ b/custom_components/electrolux_remote/base_switch.py @@ -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 diff --git a/custom_components/electrolux_remote/const.py b/custom_components/electrolux_remote/const.py index 7dd609e..6201434 100644 --- a/custom_components/electrolux_remote/const.py +++ b/custom_components/electrolux_remote/const.py @@ -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" diff --git a/custom_components/electrolux_remote/devices/centurio.py b/custom_components/electrolux_remote/devices/centurio.py index 1291aea..5bcca61 100644 --- a/custom_components/electrolux_remote/devices/centurio.py +++ b/custom_components/electrolux_remote/devices/centurio.py @@ -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(), @@ -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(), diff --git a/custom_components/electrolux_remote/devices/centurio2.py b/custom_components/electrolux_remote/devices/centurio2.py index 273d8b0..deb51c0 100644 --- a/custom_components/electrolux_remote/devices/centurio2.py +++ b/custom_components/electrolux_remote/devices/centurio2.py @@ -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(), @@ -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(), diff --git a/custom_components/electrolux_remote/devices/convector.py b/custom_components/electrolux_remote/devices/convector.py index 054e74e..2854ca8 100644 --- a/custom_components/electrolux_remote/devices/convector.py +++ b/custom_components/electrolux_remote/devices/convector.py @@ -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(), @@ -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(), @@ -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(), diff --git a/custom_components/electrolux_remote/devices/convector2.py b/custom_components/electrolux_remote/devices/convector2.py index 7847083..7e9869d 100644 --- a/custom_components/electrolux_remote/devices/convector2.py +++ b/custom_components/electrolux_remote/devices/convector2.py @@ -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(), @@ -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(), @@ -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(), @@ -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(), @@ -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(), @@ -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(), @@ -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(), diff --git a/custom_components/electrolux_remote/devices/smart.py b/custom_components/electrolux_remote/devices/smart.py index e13712e..17b5091 100644 --- a/custom_components/electrolux_remote/devices/smart.py +++ b/custom_components/electrolux_remote/devices/smart.py @@ -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(), diff --git a/custom_components/electrolux_remote/manifest.json b/custom_components/electrolux_remote/manifest.json index 0e6aedc..cafb4f7 100644 --- a/custom_components/electrolux_remote/manifest.json +++ b/custom_components/electrolux_remote/manifest.json @@ -13,5 +13,5 @@ "@Ailme" ], "iot_class": "cloud_polling", - "version": "1.1.0" + "version": "2.0.0" } diff --git a/info.md b/info.md index 7c2d9e2..72940e1 100644 --- a/info.md +++ b/info.md @@ -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