This method is used to toggle the smart LED (software managed off).
            This method is defined because sometimes user may just want to flip the state without knowing the
            current state
422697
def toggle(self):
        
        # Send command
        self.api_call.operate_on_bulb("toggle")
        # Update property
        if self.is_on():
            self.property[self.PROPERTY_NAME_POWER] = self.POWER_OFF
        elif self.is_off():
            self.property[self.PROPERTY_NAME_POWER] = self.POWER_ON
339032
def _deps_only_toggled(self, widget, data=None):
        
        active = widget.get_active()
        self.dir_name.set_sensitive(not active)
        self.entry_project_name.set_sensitive(not active)
        self.dir_name_browse_btn.set_sensitive(not active)
        self.run_btn.set_sensitive(active or not self.project_name_shown or self.entry_project_name.get_text() != "")
368741
def toggle_inhibit(self):
        """"""
        if self.inhibit:
            self._controller.set_inhibit(False)
            self.inhibit = False
        else:
            self._controller.set_inhibit(True)
            self.inhibit = True
579229
def unhide_selected():
    ''''''
    
    hidden_state = current_representation().hidden_state
    selection_state = current_representation().selection_state

    res = {}
    # Take the hidden state and flip the selected atoms bits.
    for k in selection_state:
        visible = hidden_state[k].invert()
        visible_and_selected = visible.add(selection_state[k]) # Add some atoms to be visible
        res[k] = visible_and_selected.invert()
    
    current_representation().hide(res)
59533
def switch_off(self):
        """"""
        success = self.set_status(CONST.STATUS_OFF_INT)

        if success:
            self._json_state['status'] = CONST.STATUS_CLOSED

        return success
1148005
def _set_LED(self, status):
        
        # DIO pin 1 (LED), active low
        self.hw.remote_at(
            dest_addr=self.remote_addr,
            command='D1',
            parameter='\x04' if status else '\x05')
181927
def switch_led_on(self, ids):
        
        self._set_LED(dict(zip(ids, itertools.repeat(True))))
110318
def stop_led_flash(self):
        """"""
        if self._led_flashing:
            self._led_flash = (0, 0)
            self._led_flashing = False
            # Call twice, once to stop flashing...
            self._control()
            # ...and once more to make sure the LED is on.
            self._control()
783962
def off(self):
        """"""
        off_command = ExtendedSend(self._address,
                                   COMMAND_LIGHT_OFF_0X13_0X00,
                                   self._udata)
        off_command.set_checksum()
        self._send_method(off_command, self._off_message_received)
667820
def set_indicator_led(state)
      @logger.warn '[Deprecated] `set_indicator_led` is deprecated. Please use `set_system_settings(IndicatorLED: <state>)` instead.'
      new_action = { 'IndicatorLED' => state }
      response = rest_patch('/redfish/v1/Systems/1/', body: new_action)
      response_handler(response)
      true
    end
327327
def _transition_callback(self, is_on, transition):
        
        # Update state properties
        if transition.state_stages:
            state = transition.state_stages[transition.stage_index]
            if self.is_on and is_on is False:
                # If led was turned off, set brightness to initial value
                # so that the brightness is restored when it is turned on again
                state['brightness'] = self.brightness
            self.set(is_on=is_on, cancel_transition=False, **state)

        self._active_transition = None
1294957
def toggle(self):
        
        r, g, b = self.value
        self.value = (1 - r, 1 - g, 1 - b)
239250
def toggle(self):
        """"""
        self._stable = False
        return self.show() if self.attrs["style"]["display"] == "none" else self.hide()
1343374
def switch(self):
        
        self._status = (self._status + 1) % len(self.states)
        self.status(self._status)
679798
def all_off(self):
        

        # If this is a platform without LEDs there is nothing to do
        if not self.leds:
            return

        for led in self.leds.values():
            led.brightness = 0
995404
function _switchState(state) {
            // clear previous interval if any
            _stopRunLoop();

            // call the stage destroy method
            if (_stages[_state]) {
                // just notify the object
                _stages[_state].stage.destroy();
            }

            if (_stages[state]) {
                // set the global variable
                _state = state;

                // call the reset function with _extraArgs as arguments
                _stages[_state].stage.reset.apply(_stages[_state].stage, _extraArgs);

                // and start the main loop of the
                // new requested state
                _startRunLoop();

                // execute callback if defined
                if (_onSwitchComplete) {
                    _onSwitchComplete();
                }

                // force repaint
                me.game.repaint();
            }
        }
960510
def _reset(self):
        
        # Analog pin 0
        self.hw.remote_at(
            dest_addr=self.remote_addr,
            command='D0',
            parameter='\x02')

        # Disengage remote LED, buzzer
        self.deactivate()
        self._set_send_samples(False)