Skip to content
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

Multiple Slave Support - Object ID setting #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

georgegougoudis
Copy link

Implement set_object_id.
As per MQTT Naming

If the object_id option is set, then this will be used to generate the entity_id. If, for example, we have configured a sensor, and we have set object_id to test, then Home Assistant will try to assign sensor.test as entity_id, but if this entity_id already exits it will append it with a suffix to make it unique, for example, sensor.test_2.

uniq_id is used only to ensure uniqueness but if the sensor already exists on the master device is it named, as the decumentation mentions, for example sensor.test_2. By providing the object as (unique_prefix)_(entity_name) the sensor is automatically named to something more intuitive.

image

Implement set_object_id
This allows multiple slave devices to publish the same sensors in the same discovery topic
@georgegougoudis georgegougoudis changed the title Update __init__.py Multiple Slave Support - Object ID setting May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant