Skip to content

Update entity state when ZHA device becomes available#20993

Merged
dmulcahey merged 4 commits into
home-assistant:devfrom
dmulcahey:dm/zha-device-entity-state
Feb 13, 2019
Merged

Update entity state when ZHA device becomes available#20993
dmulcahey merged 4 commits into
home-assistant:devfrom
dmulcahey:dm/zha-device-entity-state

Conversation

@dmulcahey
Copy link
Copy Markdown
Contributor

This PR causes the entities created by zha to get updated when the associated zigbee device becomes available on the network.

@ghost ghost assigned dmulcahey Feb 11, 2019
@ghost ghost added the in progress label Feb 11, 2019
Comment thread homeassistant/components/zha/device_entity.py Outdated
@MartinHjelmare
Copy link
Copy Markdown
Member

What are the reasons for keeping the device entity around? Could it be replaced with a couple of sensors and binary sensors?

@dmulcahey
Copy link
Copy Markdown
Contributor Author

@MartinHjelmare no, we’ll end up with duplicates that way. They’re being used currently to deduplicate battery sensors.

@MartinHjelmare
Copy link
Copy Markdown
Member

But why can't it be part of the sensor and binary sensor platforms? Can't we just do the same deduplication there?

@dmulcahey
Copy link
Copy Markdown
Contributor Author

Can that be something that is addressed in the future? I can explore doing that but I’d like to do it after this wave of changes

@MartinHjelmare
Copy link
Copy Markdown
Member

MartinHjelmare commented Feb 12, 2019

Sure, but if we introduce new features now that we plan to break soon, we should think about not doing that, I think.

@dmulcahey
Copy link
Copy Markdown
Contributor Author

Agreed... this functionality is technically already there. This just tweaks the existing functionality to ensure it functions as it was designed

@MartinHjelmare
Copy link
Copy Markdown
Member

Ok. 👍

Comment thread homeassistant/components/zha/device_entity.py
@dmulcahey
Copy link
Copy Markdown
Contributor Author

@MartinHjelmare all set

@dmulcahey dmulcahey merged commit 561ff33 into home-assistant:dev Feb 13, 2019
@ghost ghost removed the in progress label Feb 13, 2019
@dmulcahey dmulcahey deleted the dm/zha-device-entity-state branch February 15, 2019 22:35
@balloob balloob mentioned this pull request Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed integration: zha small-pr PRs with less than 30 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants