def is_entity_exposed(self, entity):
    'Determine if an entity should be exposed on the emulated bridge.\n\n        Async friendly.\n        '
    if (entity.attributes.get('view') is not None):
        return False
    domain = entity.domain.lower()
    explicit_expose = entity.attributes.get(ATTR_EMULATED_HUE, None)
    explicit_hidden = entity.attributes.get(ATTR_EMULATED_HUE_HIDDEN, None)
    if ((entity.entity_id in self.entities) and (CONF_ENTITY_HIDDEN in self.entities[entity.entity_id])):
        explicit_hidden = self.entities[entity.entity_id][CONF_ENTITY_HIDDEN]
    if ((explicit_expose is True) or (explicit_hidden is False)):
        expose = True
    elif ((explicit_expose is False) or (explicit_hidden is True)):
        expose = False
    else:
        expose = None
    get_deprecated(entity.attributes, ATTR_EMULATED_HUE_HIDDEN, ATTR_EMULATED_HUE, None)
    domain_exposed_by_default = (self.expose_by_default and (domain in self.exposed_domains))
    is_default_exposed = (domain_exposed_by_default and (expose is not False))
    return (is_default_exposed or expose)
Determine if an entity should be exposed on the emulated bridge.

Async friendly.
def is_entity_exposed(self, entity):
    'Determine if an entity should be exposed on the emulated bridge.\n\n        Async friendly.\n        '
    if (entity.attributes.get('view') is not None):
        return False
    domain = entity.domain.lower()
    explicit_expose = entity.attributes.get(ATTR_EMULATED_HUE, None)
    explicit_hidden = entity.attributes.get(ATTR_EMULATED_HUE_HIDDEN, None)
    if ((entity.entity_id in self.entities) and (CONF_ENTITY_HIDDEN in self.entities[entity.entity_id])):
        explicit_hidden = self.entities[entity.entity_id][CONF_ENTITY_HIDDEN]
    if ((explicit_expose is True) or (explicit_hidden is False)):
        expose = True
    elif ((explicit_expose is False) or (explicit_hidden is True)):
        expose = False
    else:
        expose = None
    get_deprecated(entity.attributes, ATTR_EMULATED_HUE_HIDDEN, ATTR_EMULATED_HUE, None)
    domain_exposed_by_default = (self.expose_by_default and (domain in self.exposed_domains))
    is_default_exposed = (domain_exposed_by_default and (expose is not False))
    return (is_default_exposed or expose)