-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the possibility to prefix entites with device name #389
Add the possibility to prefix entites with device name #389
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Prefixing I think we need to provide unique_id. People were requesting a prefix to distinguish between alarm panels: #329 |
I use HA as well, and have seen #381, but didn't find anything like that in my HA logs. Maybe I missed something. Regarding #329, it would only mean to remove 'Paradox' from it and leave only the serial, right? Or you prefer to have this configurable? BTW are you still active on gitter? I have a problem with the |
Sorry for confusion. I thought we do not provide
Probably I am. Have not seen any notifications for a long time already. |
@@ -40,7 +40,7 @@ def serialize(self): | |||
return dict( | |||
availability_topic=self.availability_topic, | |||
device=self.device, | |||
name=f'{self.entity_name}', | |||
name=f'Paradox {self.device.serial_number} {self.entity_name}' if cfg.MQTT_PREFIX_DEVICE_NAME else f'{self.entity_name}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's better have
f'{cfg.ENTITY_NAME_PREFIX}{self.entity_name}' if cfg.ENTITY_NAME_PREFIX else f'{self.entity_name}',
Default prefix can be "Paradox "
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Usage:
Note the space in the end of prefix. |
Can this be documented or included in |
It is there :) Look for |
It was removed in 4210d84.
The problem is that Home Assistant uses the name of the entity to generate it's
entity_id
and not the providedunique_id
. This can result in identical entities in Home Assistant (if using auto discovery).Or maybe an alternative to this would be to provide the value of
unique_id
inobject_id
as well. Reference: https://www.home-assistant.io/integrations/mqtt/#naming-of-mqtt-entitiesOr maybe both? ;)