Open digi-ghost opened 4 years ago
I can do it but I need to do some testing. Just FYI javascript has the notion of 'truthy' and 'falsy' so just doing if (entity.entity_id.startsWith(filterString) && !entity.attributes.hidden)
would do the trick, because both undefined and false negated will return true.
The interface is working well, however it's listing all the entities that fall into the relevant domains (light., switch. etc) even if they have the value "hidden: true" in the customize.yaml file.
I've done some testing in TizenStudio and it seems that this can be resolved by making a change to the EntitiesPage.js file in the if statement on line 69.
Current if statement:
if (entity.entity_id.startsWith(filterString))
if statement that excludes hidden entities:
if (entity.entity_id.startsWith(filterString) && typeof entity.attributes.hidden == 'undefined' || entity.entity_id.startsWith(filterString) && entity.attributes.hidden == 'false')
Happy to do a PR if it's helpful.