(self)
return {
            'type': self.type,
            'state':  {
                'instance': self.instance,
                'value': value
            }
        } if value is not None else None
Return the state of this capability for this entity.
Return the state of this capability for this entity.
Return the state of this capability for this entity .
def get_state(self) -> dict[str, Any]:
        """Return the state of this capability for this entity."""
        value = self.get_value()
        return {
            'type': self.type,
            'state':  {
                'instance': self.instance,
                'value': value
            }
        } if value is not None else None
def get_state ( self ) -> dict [ str , Any ] : value = self . get_value ( ) return { 'type' : self . type , 'state' : { 'instance' : self . instance , 'value' : value } } if value is not None else None