platypush/plugins/zigbee/mqtt/__init__.py
def toggle(self, device, *args, **kwargs) -> dict:
        """
        Implements :meth:`platypush.plugins.switch.plugin.SwitchPlugin.toggle` and toggles a Zigbee device with a
        writable binary property.
        """
        switch_info = self._get_switches_info().get(device)
        assert switch_info, '{} is not a valid switch'.format(device)
        props = self.device_set(device, switch_info['property'], switch_info['value_toggle']).output
        return self._properties_to_switch(device=device, props=props, switch_info=switch_info)

        Implements :meth:`platypush.plugins.switch.plugin.SwitchPlugin.toggle` and toggles a Zigbee device with a
        writable binary property.
        
Implements :meth:`platypush.plugins.switch.plugin.SwitchPlugin.toggle` and toggles a Zigbee device with a
writable binary property.
Implements : meth : ` platypush . plugins . switch . plugin . SwitchPlugin . toggle ` and toggles a Zigbee device with a writable binary property .
def toggle(self, device, *args, **kwargs) -> dict:
        switch_info = self._get_switches_info().get(device)
        assert switch_info, '{} is not a valid switch'.format(device)
        props = self.device_set(device, switch_info['property'], switch_info['value_toggle']).output
        return self._properties_to_switch(device=device, props=props, switch_info=switch_info)
def toggle ( self , device , * args , ** kwargs ) -> dict : switch_info = self . _get_switches_info ( ) . get ( device ) assert switch_info , '{} is not a valid switch' . format ( device ) props = self . device_set ( device , switch_info [ 'property' ] , switch_info [ 'value_toggle' ] ) . output return self . _properties_to_switch ( device = device , props = props , switch_info = switch_info )
Implements :meth:`platypush.plugins.switch.plugin.SwitchPlugin.toggle` and toggles a Zigbee device with a
writable binary property.
Implements : meth : ` platypush . plugins . switch . plugin . SwitchPlugin . toggle ` and toggles a Zigbee device with a writable binary property .
"""
        Implements :meth:`platypush.plugins.switch.plugin.SwitchPlugin.toggle` and toggles a Zigbee device with a
        writable binary property.
        """
self
device