def set_power!(state)
      level = case state
      when :on
        1
      when :off
        0
      else
        raise ArgumentError.new("Must pass in either :on or :off")
      end
      send_message!(Protocol::Device::SetPower.new(level: level), wait_for: Protocol::Device::StatePower) do |payload|
        if level == 0
          payload.level == 0
        else
          payload.level > 0
        end
      end
      self
    end
def set_power!(state)
      level = case state
      when :on
        1
      when :off
        0
      else
        raise ArgumentError.new("Must pass in either :on or :off")
      end
      send_message!(Protocol::Device::SetPower.new(level: level), wait_for: Protocol::Device::StatePower) do |payload|
        if level == 0
          payload.level == 0
        else
          payload.level > 0
        end
      end
      self
    end
Set the power state to `state` synchronously.
 @param state [:on, :off]
 @return [Light, LightCollection] self for chaining