code: def power(dev, mode):
      '''
      Power a bluetooth device on or off
  
      CLI Examples:
  
      .. code-block:: bash
  
          salt '*' bluetooth.power hci0 on
          salt '*' bluetooth.power hci0 off
      '''
      if dev not in address_():
          raise CommandExecutionError('Invalid dev passed to bluetooth.power')
  
      if mode == 'on' or mode is True:
          state = 'up'
          mode = 'on'
      else:
          state = 'down'
          mode = 'off'
      cmd = 'hciconfig {0} {1}'.format(dev, state)
      __salt__['cmd.run'](cmd).splitlines()
      info = address_()
      if info[dev]['power'] == mode:
          return True
      return Falsf power(dev, mode):
      '''
      Power a bluetooth device on or off
  
      CLI Examples:
  
      .. code-block:: bash
  
          salt '*' bluetooth.power hci0 on
          salt '*' bluetooth.power hci0 off
      '''
      if dev not in address_():
          raise CommandExecutionError('Invalid dev passed to bluetooth.power')
  
      if mode == 'on' or mode is True:
          state = 'up'
          mode = 'on'
      else:
          state = 'down'
          mode = 'off'
      cmd = 'hciconfig {0} {1}'.format(dev, state)
      __salt__['cmd.run'](cmd).splitlines()
      info = address_()
      if info[dev]['power'] == mode:
          return True
      return False
docs: Power a bluetooth device on or off
  
      CLI Examples:
  
      .. code-block:: bash
  
          salt '*' bluetooth.power hci0 on
          salt '*' bluetooth.power hci0 off