Skip to content

Update entity.py#1603

Open
msavazzi wants to merge 1 commit into
AlexxIT:masterfrom
msavazzi:master
Open

Update entity.py#1603
msavazzi wants to merge 1 commit into
AlexxIT:masterfrom
msavazzi:master

Conversation

@msavazzi

@msavazzi msavazzi commented Apr 8, 2025

Copy link
Copy Markdown

Added the number of the gang/line on multi devices like the TX

Added the number of the gang/line on multi devices like the TX
@AlexxIT AlexxIT self-assigned this Apr 9, 2025
@AlexxIT

AlexxIT commented Aug 13, 2025

Copy link
Copy Markdown
Owner

Multigang support naming for each channel from ewlink app:

def __init__(self, ewelink: XRegistry, device: dict):
XEntity.__init__(self, ewelink, device)
try:
self._attr_name = device["tags"]["ck_channel_name"][str(self.channel)]
except KeyError:
pass
# backward compatibility
self._attr_unique_id = f"{device['deviceid']}_{self.channel + 1}"

@msavazzi

Copy link
Copy Markdown
Author

@AlexxIT you're right, if the first part of the name is identical to the Device ID it is removed, so my change now does not work anymore :( I've updated it to replace the . in the device name with : so I can have the gang id after.
Quite annoying :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants