Fix views not loading when using card_options (#118)

The logic to check whether an entity is hidden has been changed.

Instead of checking the `entity_id` field which is always undefined, the
updated logic now dynamically references the `entity.entity_id` within 
the card options of the strategy options.

---------

Co-authored-by: Ferry Cools <fcools@digilive.nl>
This commit is contained in:
Niekert
2024-01-26 12:41:17 +01:00
committed by GitHub
parent 6e03f0d211
commit e174d06957

View File

@ -149,7 +149,7 @@ abstract class AbstractView {
entity =>
entity.entity_id.startsWith(domain + ".")
&& !entity.hidden_by
&& !Helper.strategyOptions.card_options?.entity_id.hidden
&& !Helper.strategyOptions.card_options?.[entity.entity_id]?.hidden
).map(entity => entity.entity_id),
};
}