-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Expand groups in entitry row to check toggle #6930
Conversation
private _computeCanToggle = memoizeOne( | ||
(hass: HomeAssistant, entityIds: string[]): boolean => { | ||
return entityIds.some((entityId) => { | ||
const domain = entityId.split(".", 1)[0]; |
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.
const domain = entityId.split(".", 1)[0]; | |
const domain = computeDomain(entityId); |
@@ -22,6 +23,21 @@ class HuiGroupEntityRow extends LitElement implements LovelaceRow { | |||
|
|||
@internalProperty() private _config?: EntityConfig; | |||
|
|||
private _computeCanToggle = memoizeOne( | |||
(hass: HomeAssistant, entityIds: string[]): boolean => { |
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.
Just see you made a memoize from it, but you pass hass
, that means it will still update on every state change.
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.
True...
Breaking change
Proposed change
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: