(self)
return self._properties
Return properties for entity.
Return properties for entity.
Return properties for entity .
def properties(self) -> list[AbstractProperty]:
        """Return properties for entity."""
        if self._properties is not None:
            return self._properties

        self._properties = []
        state = self.state
        entity_config = self.config.get_entity_config(state.entity_id)

        for property_config in entity_config.get(CONF_ENTITY_PROPERTIES, []):
            self._properties.append(
                CustomEntityProperty.get(self.hass, self.config, state, property_config)
            )

        for Property in prop.PROPERTIES:
            entity_property = Property(self.hass, self.config, state)
            if entity_property.supported():
                if entity_property.instance not in [p.instance for p in self._properties]:
                    self._properties.append(entity_property)

        return self._properties
def properties ( self ) -> list [ AbstractProperty ] : if self . _properties is not None : return self . _properties self . _properties = [ ] state = self . state entity_config = self . config . get_entity_config ( state . entity_id ) for property_config in entity_config . get ( CONF_ENTITY_PROPERTIES , [ ] ) : self . _properties . append ( CustomEntityProperty . get ( self . hass , self . config , state , property_config ) ) for Property in prop . PROPERTIES : entity_property = Property ( self . hass , self . config , state ) if entity_property . supported ( ) : if entity_property . instance not in [ p . instance for p in self . _properties ] : self . _properties . append ( entity_property ) return self . _properties