This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the directory your configuration.yaml file is location, create a folder called custom_components and put group_globber.py there. Then inside your configuration.yaml file, add a section like so: | |
group_globber: | |
groups: | |
group.group_emby: | |
- media_player.emby* | |
You should probably already have the group, in this case "group_emby" already created somewhere. Then you can add a list of wildcards that'll match entities and put them in that group. | |
Note: I have not tried modifying the built in "all" groups and I have always had the group I want to add things to already created. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Support the ISY-994 controllers. | |
For configuration details please visit the documentation for this component at | |
https://home-assistant.io/components/isy994/ | |
""" | |
import asyncio | |
from collections import namedtuple | |
import logging | |
from urllib.parse import urlparse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyMonsterCard extends HTMLElement { | |
_getEntities(hass, filters) { | |
function _filterEntityId(stateObj, pattern) { | |
if (pattern.indexOf('*') === -1) { | |
return stateObj.entity_id === pattern; | |
} | |
const regEx = new RegExp(`^${pattern.replace(/\*/g, '.*')}$`, 'i'); | |
return stateObj.entity_id.search(regEx) === 0; | |
} |