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

Add unique id and device for better HA UI integration #1547

Merged
merged 6 commits into from
Feb 26, 2019

Conversation

abmantis
Copy link
Contributor

The unique id allows the device name and entity_id in HA to be edited from the UI. The "device" info allows the entities to be associated with a single device and appear on the MQTT Integrations UI.

@mcspr
Copy link
Collaborator

mcspr commented Feb 15, 2019

Hey.

I don't think it should add anything into the configuration yaml generator, see
https://www.home-assistant.io/components/switch.mqtt/#device
https://www.home-assistant.io/components/sensor.mqtt/#device

@abmantis
Copy link
Contributor Author

@mcspr sorry, I don't understand what you mean.

@mcspr
Copy link
Collaborator

mcspr commented Feb 15, 2019

@abmantis try running ha.config in terminal:

sensor:
  - name: ESPURNA_3601AF_event
    platform: mqtt
    state_topic: test/ESPURNA-3601AF/event/0
    unit_of_measurement:
    uniq_id: ESPURNA-3601AF_14_1
    device: {"identifiers":["ESPURNA-3601AF"],"name":"ESPURNA_3601AF","manufacturer":"Espurna","model":"NODEMCU_LOLIN","sw_version":"1.13.4-dev (2f147ec0)"}

@abmantis
Copy link
Contributor Author

Oh ok. So you think this should only be applied to the discovery message and not the generator. Is that it?

@mcspr
Copy link
Collaborator

mcspr commented Feb 15, 2019

Yes, it does not apply to anything other than discovery.

@abmantis
Copy link
Contributor Author

Anything missing for this to be merged?

@mcspr
Copy link
Collaborator

mcspr commented Feb 23, 2019

...note that it pretty much does not work when switches are >3, on initial connection.
manual ha.send works (default build, where debug messages do yielding)

'll instigate fix from #1370

@xoseperez xoseperez merged commit dd6e446 into xoseperez:dev Feb 26, 2019
@abmantis abmantis deleted the ha_discovery_devices branch February 26, 2019 12:31
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.

3 participants