platypush/plugins/zigbee/mqtt/__init__.py
def device_set(self, device: str, property: str, value: Any, **kwargs):
        """
        Set a properties on a device. The compatible properties vary depending on the device. For example, a light bulb
        may have the "``state``" and "``brightness``" properties, while an environment sensor may have the
        "``temperature``" and "``humidity``" properties, and so on.

        :param device: Display name of the device.
        :param property: Name of the property that should be set.
        :param value: New value of the property.
        :param kwargs: Extra arguments to be passed to :meth:`platypush.plugins.mqtt.MqttPlugin.publish``
            (default: query the default configured device).
        """
        properties = self.publish(topic=self._topic(device + '/set'),
                                  reply_topic=self._topic(device),
                                  msg={property: value}, **self._mqtt_args(**kwargs)).output

        if property:
            assert property in properties, 'No such property: ' + property
            return {property: properties[property]}

        return properties

        Set a properties on a device. The compatible properties vary depending on the device. For example, a light bulb
        may have the "``state``" and "``brightness``" properties, while an environment sensor may have the
        "``temperature``" and "``humidity``" properties, and so on.

        :param device: Display name of the device.
        :param property: Name of the property that should be set.
        :param value: New value of the property.
        :param kwargs: Extra arguments to be passed to :meth:`platypush.plugins.mqtt.MqttPlugin.publish``
            (default: query the default configured device).
        
Set a properties on a device. The compatible properties vary depending on the device.
Set a properties on a device . The compatible properties vary depending on the device .
def device_set(self, device: str, property: str, value: Any, **kwargs):
        properties = self.publish(topic=self._topic(device + '/set'),
                                  reply_topic=self._topic(device),
                                  msg={property: value}, **self._mqtt_args(**kwargs)).output
        if property:
            assert property in properties, 'No such property: ' + property
            return {property: properties[property]}
        return properties
def device_set ( self , device : str , property : str , value : Any , ** kwargs ) : properties = self . publish ( topic = self . _topic ( device + '/set' ) , reply_topic = self . _topic ( device ) , msg = { property : value } , ** self . _mqtt_args ( ** kwargs ) ) . output if property : assert property in properties , 'No such property: ' + property return { property : properties [ property ] } return properties
Set a properties on a device.
Set a properties on a device .
"""
        Set a properties on a device. The compatible properties vary depending on the device. For example, a light bulb
        may have the "``state``" and "``brightness``" properties, while an environment sensor may have the
        "``temperature``" and "``humidity``" properties, and so on.

        :param device: Display name of the device.
        :param property: Name of the property that should be set.
        :param value: New value of the property.
        :param kwargs: Extra arguments to be passed to :meth:`platypush.plugins.mqtt.MqttPlugin.publish``
            (default: query the default configured device).
        """
self
device
str
Display name of the device.
Display name of the device .
property
str
Name of the property that should be set.
Name of the property that should be set .
value
Any
New value of the property.
New value of the property .
kwargs
Extra arguments to be passed to :meth:`platypush.plugins.mqtt.MqttPlugin.publish``
(default: query the default configured device).
Extra arguments to be passed to : meth : ` platypush . plugins . mqtt . MqttPlugin . publish ` ` ( default : query the default configured device ) .