Skip to content

Fix area index selection on ZHA device card#4406

Merged
bramkragten merged 1 commit into
home-assistant:devfrom
dmulcahey:dm/fix-zha-device-card-areas
Jan 2, 2020
Merged

Fix area index selection on ZHA device card#4406
bramkragten merged 1 commit into
home-assistant:devfrom
dmulcahey:dm/fix-zha-device-card-areas

Conversation

@dmulcahey
Copy link
Copy Markdown
Contributor

Ensure that the selectedAreaIndex is set properly on the ZHA device card.

@bramkragten bramkragten merged commit 1b0d8bb into home-assistant:dev Jan 2, 2020
@@ -81,6 +81,12 @@ class ZHADeviceCard extends LitElement {
super.connectedCallback();
this._unsubAreas = subscribeAreaRegistry(this.hass.connection, (areas) => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should btw look into the subscribeMixin https://github.com/home-assistant/home-assistant-polymer/blob/dev/src/mixins/subscribe-mixin.ts it handles the right moment to subscribe and unsubscribe.

@bramkragten bramkragten mentioned this pull request Jan 7, 2020
@lock lock Bot locked and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants